Skip to content

Commit

Permalink
comments
Browse files Browse the repository at this point in the history
  • Loading branch information
darrencoutts118 committed Sep 10, 2024
1 parent af65c17 commit 9e75546
Show file tree
Hide file tree
Showing 26 changed files with 152 additions and 27 deletions.
7 changes: 6 additions & 1 deletion src/Components/App.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,12 @@

class App extends BaseComponent
{
protected $viewName = 'appkit-ui::components.app';
/**
* The name of the view that this component renders
*
* @var string
*/
protected string $viewName = 'components.app';

public function __construct(

Expand Down
4 changes: 2 additions & 2 deletions src/Components/BaseComponent.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ abstract class BaseComponent extends BladeComponent
*
* @var string
*/
protected $viewName = null;
protected string $viewName = '';

public $elements = [];

Expand Down Expand Up @@ -165,7 +165,7 @@ public function render()
}
}

return view($this->viewName, $data)->render();
return view('appkit-ui::' . $this->viewName, $data)->render();
};
}
}
7 changes: 6 additions & 1 deletion src/Components/Button.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,12 @@

class Button extends BaseComponent
{
protected $viewName = 'appkit-ui::components.button';
/**
* The name of the view that this component renders
*
* @var string
*/
protected string $viewName = 'components.button';

public function __construct(
public string $color = 'blue',
Expand Down
7 changes: 6 additions & 1 deletion src/Components/Checkables.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,12 @@

class Checkables extends BaseComponent
{
protected $viewName = 'appkit-ui::components.checkables';
/**
* The name of the view that this component renders
*
* @var string
*/
protected string $viewName = 'components.checkables';

public string $itemComponentName = '';

Expand Down
7 changes: 6 additions & 1 deletion src/Components/Checkbox.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,12 @@

class Checkbox extends BaseComponent
{
protected $viewName = 'appkit-ui::components.checkbox';
/**
* The name of the view that this component renders
*
* @var string
*/
protected string $viewName = 'components.checkbox';

public function __construct(
public string $name,
Expand Down
7 changes: 6 additions & 1 deletion src/Components/Drawer.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,12 @@

class Drawer extends BaseComponent
{
protected $viewName = 'appkit-ui::components.drawer';
/**
* The name of the view that this component renders
*
* @var string
*/
protected string $viewName = 'components.drawer';

public function __construct(
public string $name,
Expand Down
7 changes: 6 additions & 1 deletion src/Components/FieldError.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,12 @@

class FieldError extends BaseComponent
{
protected $viewName = 'appkit-ui::components.field-error';
/**
* The name of the view that this component renders
*
* @var string
*/
protected string $viewName = 'components.field-error';

public function __construct(
public ?string $name,
Expand Down
7 changes: 6 additions & 1 deletion src/Components/FieldGroup.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,12 @@

class FieldGroup extends BaseComponent
{
protected $viewName = 'appkit-ui::components.field-group';
/**
* The name of the view that this component renders
*
* @var string
*/
protected string $viewName = 'components.field-group';

/**
* Attributes to be applied to the element
Expand Down
7 changes: 6 additions & 1 deletion src/Components/Fieldset.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,12 @@

class Fieldset extends BaseComponent
{
protected $viewName = 'appkit-ui::components.fieldset';
/**
* The name of the view that this component renders
*
* @var string
*/
protected string $viewName = 'components.fieldset';

public function __construct(
public string $legend,
Expand Down
7 changes: 6 additions & 1 deletion src/Components/Form.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,12 @@

class Form extends BaseComponent
{
protected $viewName = 'appkit-ui::components.form';
/**
* The name of the view that this component renders
*
* @var string
*/
protected string $viewName = 'components.form';

public function __construct(
// public $action = '',
Expand Down
7 changes: 6 additions & 1 deletion src/Components/Heading.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,12 @@

class Heading extends BaseComponent
{
protected $viewName = 'appkit-ui::components.heading';
/**
* The name of the view that this component renders
*
* @var string
*/
protected string $viewName = 'components.heading';

public function __construct(
public string $level,
Expand Down
7 changes: 6 additions & 1 deletion src/Components/HelpText.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,12 @@

class HelpText extends BaseComponent
{
protected $viewName = 'appkit-ui::components.help-text';
/**
* The name of the view that this component renders
*
* @var string
*/
protected string $viewName = 'components.help-text';

public function __construct(
public string $help,
Expand Down
7 changes: 6 additions & 1 deletion src/Components/Input.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,12 @@

class Input extends BaseComponent
{
protected $viewName = 'appkit-ui::components.input';
/**
* The name of the view that this component renders
*
* @var string
*/
protected string $viewName = 'components.input';

public $wrapperElement;

Expand Down
7 changes: 6 additions & 1 deletion src/Components/Label.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,12 @@

class Label extends BaseComponent
{
protected $viewName = 'appkit-ui::components.label';
/**
* The name of the view that this component renders
*
* @var string
*/
protected string $viewName = 'components.label';

public function __construct(
public string $for,
Expand Down
7 changes: 6 additions & 1 deletion src/Components/Modal.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,12 @@

class Modal extends BaseComponent
{
protected $viewName = 'appkit-ui::components.modal';
/**
* The name of the view that this component renders
*
* @var string
*/
protected string $viewName = 'components.modal';

public function __construct(
public string $name,
Expand Down
7 changes: 6 additions & 1 deletion src/Components/Radio.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,12 @@

class Radio extends BaseComponent
{
protected $viewName = 'appkit-ui::components.radio';
/**
* The name of the view that this component renders
*
* @var string
*/
protected string $viewName = 'components.radio';

public function __construct(
public string $name,
Expand Down
7 changes: 6 additions & 1 deletion src/Components/RepeatingGroup.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,12 @@

class RepeatingGroup extends BaseComponent
{
protected $viewName = 'appkit-ui::components.repeating-group.index';
/**
* The name of the view that this component renders
*
* @var string
*/
protected string $viewName = 'components.repeating-group.index';

public function __construct(
public string $source,
Expand Down
7 changes: 6 additions & 1 deletion src/Components/RepeatingGroup/AddAnotherButton.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,12 @@

class AddAnotherButton extends BaseComponent
{
protected $viewName = 'appkit-ui::components.repeating-group.add-another-button';
/**
* The name of the view that this component renders
*
* @var string
*/
protected string $viewName = 'components.repeating-group.add-another-button';

public function __construct(
public string $source,
Expand Down
7 changes: 6 additions & 1 deletion src/Components/RepeatingGroup/RemoveButton.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,12 @@ class RemoveButton extends BaseComponent
/**
* {@inheritDoc}
*/
protected $viewName = 'appkit-ui::components.repeating-group.remove-button';
/**
* The name of the view that this component renders
*
* @var string
*/
protected string $viewName = 'components.repeating-group.remove-button';

/**
* Construct a Remove Button component
Expand Down
7 changes: 6 additions & 1 deletion src/Components/RepeatingGroup/ReorderButtons.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,12 @@ class ReorderButtons extends BaseComponent
/**
* {@inheritDoc}
*/
protected $viewName = 'appkit-ui::components.repeating-group.reorder-buttons';
/**
* The name of the view that this component renders
*
* @var string
*/
protected string $viewName = 'components.repeating-group.reorder-buttons';

/**
* Construct a Remove Button component
Expand Down
7 changes: 6 additions & 1 deletion src/Components/RepeatingGroup/ReorderHandle.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,12 @@

class ReorderHandle extends BaseComponent
{
protected $viewName = 'appkit-ui::components.repeating-group.reorder-handle';
/**
* The name of the view that this component renders
*
* @var string
*/
protected string $viewName = 'components.repeating-group.reorder-handle';

public function __construct()
{
Expand Down
7 changes: 6 additions & 1 deletion src/Components/RepeatingGroup/ReorderItem.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,12 @@ class ReorderItem extends BaseComponent
/**
* {@inheritDoc}
*/
protected $viewName = 'appkit-ui::components.repeating-group.reorder-item';
/**
* The name of the view that this component renders
*
* @var string
*/
protected string $viewName = 'components.repeating-group.reorder-item';

/**
* Construct a Remove Button component
Expand Down
7 changes: 6 additions & 1 deletion src/Components/Select.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,12 @@

class Select extends BaseComponent
{
protected $viewName = 'appkit-ui::components.select';
/**
* The name of the view that this component renders
*
* @var string
*/
protected string $viewName = 'components.select';

public $wrapperElement;

Expand Down
7 changes: 6 additions & 1 deletion src/Components/Tab.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,12 @@

class Tab extends BaseComponent
{
protected $viewName = 'appkit-ui::components.tab';
/**
* The name of the view that this component renders
*
* @var string
*/
protected string $viewName = 'components.tab';

public function __construct(
public string $title
Expand Down
7 changes: 6 additions & 1 deletion src/Components/Tabs.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,12 @@

class Tabs extends BaseComponent
{
protected $viewName = 'appkit-ui::components.tabs';
/**
* The name of the view that this component renders
*
* @var string
*/
protected string $viewName = 'components.tabs';

public function __construct(

Expand Down
7 changes: 6 additions & 1 deletion src/Components/TextArea.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,12 @@

class TextArea extends BaseComponent
{
protected $viewName = 'appkit-ui::components.text-area';
/**
* The name of the view that this component renders
*
* @var string
*/
protected string $viewName = 'components.text-area';

public $wrapperElement;

Expand Down

0 comments on commit 9e75546

Please sign in to comment.