Skip to content

Commit

Permalink
up
Browse files Browse the repository at this point in the history
  • Loading branch information
marco76tv committed May 30, 2024
1 parent e03778e commit 42e26e5
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions Filament/Blocks/Heading.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<?php

declare(strict_types=1);

namespace Modules\UI\Filament\Blocks;

use Filament\Forms\Components\Builder\Block;
use Filament\Forms\Components\Select;
use Filament\Forms\Components\TextInput;

class Heading
{
public static function make(
string $name = 'heading',
string $context = 'form',
): Block {
return Block::make($name)
->schema(
[
TextInput::make('content')
->label('Heading')
->required(),
Select::make('level')
->options([
'h1' => 'Heading 1',
'h2' => 'Heading 2',
'h3' => 'Heading 3',
'h4' => 'Heading 4',
'h5' => 'Heading 5',
'h6' => 'Heading 6',
])
->required(),
]
)->columns(2);
}
}

0 comments on commit 42e26e5

Please sign in to comment.