diff --git a/source/php/Component/Tabs/partials/tab-button.blade.php b/source/php/Component/Tabs/partials/tab-button.blade.php new file mode 100644 index 00000000..b927a022 --- /dev/null +++ b/source/php/Component/Tabs/partials/tab-button.blade.php @@ -0,0 +1,18 @@ +@button([ + 'classList' => [$baseClass . '__button'], + 'attributeList' => [ + 'role' => 'tab', + 'aria-controls' => $baseClass . '__aria-' . $id . '-' . $loop->index, + 'aria-expanded' => $loop->index === 0 ? 'true' : 'false', + 'js-expand-button' => true, + 'style' => 'border-radius: unset;' + ] +]) + @element([ + 'componentElement' => 'span', + 'classList' => $baseClass . '__button-wrapper', + 'attributeList' => ['tabindex' => '-1'] + ]) + {{ $tab['title'] ?? '' }} + @endelement +@endbutton \ No newline at end of file diff --git a/source/php/Component/Tabs/tabs.blade.php b/source/php/Component/Tabs/tabs.blade.php index 42e96827..74b393ac 100644 --- a/source/php/Component/Tabs/tabs.blade.php +++ b/source/php/Component/Tabs/tabs.blade.php @@ -3,11 +3,7 @@ <{{$componentElement}} class="{{ $class }}" role="tablist" js-expand-container {!! $attribute !!}>