initial placeholder component

This commit is contained in:
Dan Pock
2021-05-07 16:36:28 -04:00
parent 88e515f87b
commit ddcd88bc82
3 changed files with 53 additions and 0 deletions
@@ -0,0 +1,14 @@
<x-forms::field-group
:column-span="$formComponent->getColumnSpan()"
:error-key="$formComponent->getName()"
:for="$formComponent->getId()"
:label="$formComponent->getLabel()"
>
<div class="flex">
<span
class="block w-full placeholder-gray-400 placeholder-opacity-100 px-3 py-2 cursor-default"
>
{{ $formComponent->getName() }}
</span>
</div>
</x-forms::field-group>
@@ -0,0 +1,31 @@
<?php
namespace Filament\Forms\Components;
class Placeholder extends Component
{
protected $name;
public function __construct($placeholderValue)
{
$this->name($placeholderValue);
$this->setUp();
}
protected function name($name)
{
$this->name = $name;
return $this;
}
public function getName()
{
return $this->name;
}
public static function make(string $placeholderValue)
{
return new static($placeholderValue);
}
}
@@ -0,0 +1,8 @@
<?php
namespace Filament\Resources\Forms\Components;
class Placeholder extends \Filament\Forms\Components\Placeholder
{
use Concerns\CanBeDependentOnResourceRecord;
}