Forms\Components\Section::make('Heading')
->collapsible()
->schema([
Forms\Components\Hidden::make('heading.color'), // sadly I need to have this, otherwise $set('heading.color', $data['color']); would be inside child modal only
Forms\Components\TextInput::make("heading.text")
->hiddenLabel()
->required()
->columnSpan(5),
Forms\Components\Actions::make([
Forms\Components\Actions\Action::make('settings')
->form([
Forms\Components\ColorPicker::make('color')
->default(fn (Get $get) => $get('heading.color')),
])
->action(function (Set $set, Get $get, $data) {
$set('heading.color', $data['color']);
})
])
->columnSpan(1)
])->columns(6),
Forms\Components\Section::make('Heading')
->collapsible()
->schema([
Forms\Components\Hidden::make('heading.color'), // sadly I need to have this, otherwise $set('heading.color', $data['color']); would be inside child modal only
Forms\Components\TextInput::make("heading.text")
->hiddenLabel()
->required()
->columnSpan(5),
Forms\Components\Actions::make([
Forms\Components\Actions\Action::make('settings')
->form([
Forms\Components\ColorPicker::make('color')
->default(fn (Get $get) => $get('heading.color')),
])
->action(function (Set $set, Get $get, $data) {
$set('heading.color', $data['color']);
})
])
->columnSpan(1)
])->columns(6),