Fix styling
This commit is contained in:
committed by
github-actions[bot]
parent
41fb6a1fc9
commit
d86274cc37
@@ -12,13 +12,13 @@ class Button extends Component
|
||||
* Create a new component instance.
|
||||
*/
|
||||
public function __construct(
|
||||
public bool $disabled = false,
|
||||
public bool $noStyle = false,
|
||||
public ?string $modalId = null,
|
||||
public string $defaultClass = "button"
|
||||
public bool $disabled = false,
|
||||
public bool $noStyle = false,
|
||||
public ?string $modalId = null,
|
||||
public string $defaultClass = 'button'
|
||||
) {
|
||||
if ($this->noStyle) {
|
||||
$this->defaultClass = "";
|
||||
$this->defaultClass = '';
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -12,14 +12,14 @@ class Checkbox extends Component
|
||||
* Create a new component instance.
|
||||
*/
|
||||
public function __construct(
|
||||
public ?string $id = null,
|
||||
public ?string $name = null,
|
||||
public ?string $value = null,
|
||||
public ?string $label = null,
|
||||
public ?string $helper = null,
|
||||
public ?string $id = null,
|
||||
public ?string $name = null,
|
||||
public ?string $value = null,
|
||||
public ?string $label = null,
|
||||
public ?string $helper = null,
|
||||
public string|bool $instantSave = false,
|
||||
public bool $disabled = false,
|
||||
public string $defaultClass = "dark:border-neutral-700 text-coolgray-400 focus:ring-warning dark:bg-coolgray-100 rounded cursor-pointer dark:disabled:bg-base dark:disabled:cursor-not-allowed",
|
||||
public bool $disabled = false,
|
||||
public string $defaultClass = 'dark:border-neutral-700 text-coolgray-400 focus:ring-warning dark:bg-coolgray-100 rounded cursor-pointer dark:disabled:bg-base dark:disabled:cursor-not-allowed',
|
||||
) {
|
||||
//
|
||||
}
|
||||
|
||||
@@ -18,8 +18,8 @@ class Datalist extends Component
|
||||
public ?string $name = null,
|
||||
public ?string $label = null,
|
||||
public ?string $helper = null,
|
||||
public bool $required = false,
|
||||
public string $defaultClass = "input"
|
||||
public bool $required = false,
|
||||
public string $defaultClass = 'input'
|
||||
) {
|
||||
//
|
||||
}
|
||||
@@ -29,10 +29,15 @@ class Datalist extends Component
|
||||
*/
|
||||
public function render(): View|Closure|string
|
||||
{
|
||||
if (is_null($this->id)) $this->id = new Cuid2(7);
|
||||
if (is_null($this->name)) $this->name = $this->id;
|
||||
if (is_null($this->id)) {
|
||||
$this->id = new Cuid2(7);
|
||||
}
|
||||
if (is_null($this->name)) {
|
||||
$this->name = $this->id;
|
||||
}
|
||||
|
||||
$this->label = Str::title($this->label);
|
||||
|
||||
return view('components.forms.datalist');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,23 +15,28 @@ class Input extends Component
|
||||
public ?string $type = 'text',
|
||||
public ?string $value = null,
|
||||
public ?string $label = null,
|
||||
public bool $required = false,
|
||||
public bool $disabled = false,
|
||||
public bool $readonly = false,
|
||||
public bool $required = false,
|
||||
public bool $disabled = false,
|
||||
public bool $readonly = false,
|
||||
public ?string $helper = null,
|
||||
public bool $allowToPeak = true,
|
||||
public bool $isMultiline = false,
|
||||
public string $defaultClass = "input",
|
||||
public bool $allowToPeak = true,
|
||||
public bool $isMultiline = false,
|
||||
public string $defaultClass = 'input',
|
||||
) {
|
||||
}
|
||||
|
||||
public function render(): View|Closure|string
|
||||
{
|
||||
if (is_null($this->id)) $this->id = new Cuid2(7);
|
||||
if (is_null($this->name)) $this->name = $this->id;
|
||||
if ($this->type === 'password') {
|
||||
$this->defaultClass = $this->defaultClass . " pr-[2.8rem]";
|
||||
if (is_null($this->id)) {
|
||||
$this->id = new Cuid2(7);
|
||||
}
|
||||
if (is_null($this->name)) {
|
||||
$this->name = $this->id;
|
||||
}
|
||||
if ($this->type === 'password') {
|
||||
$this->defaultClass = $this->defaultClass.' pr-[2.8rem]';
|
||||
}
|
||||
|
||||
// $this->label = Str::title($this->label);
|
||||
return view('components.forms.input');
|
||||
}
|
||||
|
||||
@@ -18,8 +18,8 @@ class Select extends Component
|
||||
public ?string $name = null,
|
||||
public ?string $label = null,
|
||||
public ?string $helper = null,
|
||||
public bool $required = false,
|
||||
public string $defaultClass = "select"
|
||||
public bool $required = false,
|
||||
public string $defaultClass = 'select'
|
||||
) {
|
||||
//
|
||||
}
|
||||
@@ -29,10 +29,15 @@ class Select extends Component
|
||||
*/
|
||||
public function render(): View|Closure|string
|
||||
{
|
||||
if (is_null($this->id)) $this->id = new Cuid2(7);
|
||||
if (is_null($this->name)) $this->name = $this->id;
|
||||
if (is_null($this->id)) {
|
||||
$this->id = new Cuid2(7);
|
||||
}
|
||||
if (is_null($this->name)) {
|
||||
$this->name = $this->id;
|
||||
}
|
||||
|
||||
$this->label = Str::title($this->label);
|
||||
|
||||
return view('components.forms.select');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,16 +19,16 @@ class Textarea extends Component
|
||||
public ?string $value = null,
|
||||
public ?string $label = null,
|
||||
public ?string $placeholder = null,
|
||||
public bool $required = false,
|
||||
public bool $disabled = false,
|
||||
public bool $readonly = false,
|
||||
public bool $allowTab = false,
|
||||
public bool $spellcheck = false,
|
||||
public bool $required = false,
|
||||
public bool $disabled = false,
|
||||
public bool $readonly = false,
|
||||
public bool $allowTab = false,
|
||||
public bool $spellcheck = false,
|
||||
public ?string $helper = null,
|
||||
public bool $realtimeValidation = false,
|
||||
public bool $allowToPeak = true,
|
||||
public string $defaultClass = "input scrollbar font-mono",
|
||||
public string $defaultClassInput = "input"
|
||||
public bool $realtimeValidation = false,
|
||||
public bool $allowToPeak = true,
|
||||
public string $defaultClass = 'input scrollbar font-mono',
|
||||
public string $defaultClassInput = 'input'
|
||||
) {
|
||||
//
|
||||
}
|
||||
@@ -38,8 +38,12 @@ class Textarea extends Component
|
||||
*/
|
||||
public function render(): View|Closure|string
|
||||
{
|
||||
if (is_null($this->id)) $this->id = new Cuid2(7);
|
||||
if (is_null($this->name)) $this->name = $this->id;
|
||||
if (is_null($this->id)) {
|
||||
$this->id = new Cuid2(7);
|
||||
}
|
||||
if (is_null($this->name)) {
|
||||
$this->name = $this->id;
|
||||
}
|
||||
|
||||
// $this->label = Str::title($this->label);
|
||||
return view('components.forms.textarea');
|
||||
|
||||
Reference in New Issue
Block a user