Closed bastinald closed 3 years ago
This is close but still not as clean:
public function render()
{
return function ($data) {
$attributes = $data['attributes']->class([
'w-full rounded-lg placeholder-gray-400 border-gray-400 mb-4'
])->merge([
'type' => 'text',
]);
return <<<HTML
<input $attributes>
HTML;
};
}
It would be nice if we could specify our props and classes inside of blade component classes to keep our views cleaner.
For example:
Then in the view:
If there is already a way to do this please let me know.