This commit is contained in:
Ryan Scherler
2020-12-21 18:15:38 -08:00
parent 9a133f89b8
commit e675f4ecca
5 changed files with 17 additions and 22 deletions
+5
View File
@@ -7,4 +7,9 @@
@endforeach
</ol>
<x-filament::error :field="$model" />
@if ($help)
<x-filament::help>
@markdown($help)
</x-filament::help>
@endif
</div>
+2 -2
View File
@@ -4,9 +4,9 @@
</legend>
<div class="space-y-2">
<x-filament::fields :fields="$fields" :class="$class" />
@if ($info)
@if ($help)
<x-filament::help>
@markdown($info)
@markdown($help)
</x-filament::help>
@endif
</div>
+10
View File
@@ -7,6 +7,7 @@ use Illuminate\Support\Str;
class BaseField {
public $model;
public $id;
public $help;
protected $enabled = true;
protected $view;
@@ -33,6 +34,15 @@ class BaseField {
return $this;
}
/**
* @return static
*/
public function help(string $help): self
{
$this->help = $help;
return $this;
}
/**
* @return static
*/
-10
View File
@@ -7,7 +7,6 @@ class Field extends BaseField {
public $value;
public $label;
public $hint;
public $help;
public $extraAttributes = [];
/**
@@ -48,15 +47,6 @@ class Field extends BaseField {
return $this;
}
/**
* @return static
*/
public function help(string $help): self
{
$this->help = $help;
return $this;
}
/**
* @return static
*/
-10
View File
@@ -6,7 +6,6 @@ class Fieldset extends BaseField {
public $legend;
public $fields;
public $class;
public $info;
public function __construct($legend)
{
@@ -38,13 +37,4 @@ class Fieldset extends BaseField {
$this->class = $class;
return $this;
}
/**
* @return static
*/
public function info(string $info): self
{
$this->info = $info;
return $this;
}
}