Closed lee-to closed 2 months ago
Tabs::make([ Tab::make('Tab 1', [ ActionButton::make('Go to tab 2')->onClick(fn() => 'setActiveTab(`my-tab-2`)'), ])->uniqueId('my-tab-1'), Tab::make('Tab 2', [ ActionButton::make('Go to tab 1')->onClick(fn() => 'setActiveTab(`my-tab-1`)'), ])->uniqueId('my-tab-2'), ]), ]),
// ModelResource public function modifyFormComponent(MoonShineRenderable $component): MoonShineRenderable { return parent::modifyFormComponent($component)->fields([ FlexibleRender::make('Top'), ...parent::modifyFormComponent($component)->getFields()->toArray(), FlexibleRender::make('Bottom'), ])->submit('Go'); } public function modifyListComponent(MoonShineRenderable $component): MoonShineRenderable { return parent::modifyListComponent($component)->customAttributes([ 'data-my-attr' => 'value' ]); } public function modifyDetailComponent(MoonShineRenderable $component): MoonShineRenderable { return parent::modifyDetailComponent($component)->customAttributes([ 'data-my-attr' => 'value' ]); }