diff --git a/resources/views/components/button.blade.php b/resources/views/components/button.blade.php index dd8d75c5..0a35e9c0 100644 --- a/resources/views/components/button.blade.php +++ b/resources/views/components/button.blade.php @@ -24,7 +24,9 @@ Behaviour kept from maryUI: `link` renders an anchor with `wire:navigate` (unless `external` or `no-wire-navigate`); `disabled` works on a link too, as `aria-disabled`; `spinner` shows the loading indicator while the button's own `wire:click` runs (or the action named by a - string); `responsive` hides the label below `expanded` (840px, where M3 lets buttons reposition); + string), drawn in the button's own ink — M3 asks an indicator embedded in another component + to take that component's label colour, so it stays visible on a filled or tonal container; + `responsive` hides the label below `expanded` (840px, where M3 lets buttons reposition); `tooltip`, `tooltip-left`, `tooltip-right` and `tooltip-bottom` attach a plain tooltip. `fab` is a page's create action: an extended FAB pinned in the thumb zone on a compact window (below `medium`, 600px), a filled button from @@ -206,7 +208,7 @@ <{{ $tag }} {{ $attributes }}> @if ($spinnerTarget) - + @endif diff --git a/tests/Feature/Components/ButtonTest.php b/tests/Feature/Components/ButtonTest.php index 4de5bb2b..9a7543d5 100644 --- a/tests/Feature/Components/ButtonTest.php +++ b/tests/Feature/Components/ButtonTest.php @@ -120,10 +120,12 @@ it('disables a button, and a link as far as a link can be', function () { ->assertSee('tabindex="-1"', false); }); -it('shows the loading indicator while its own action runs', function () { +it('shows the loading indicator while its own action runs, in the button\'s own ink', function () { $this->blade('') ->assertSee('wire:loading.attr="disabled"', false) - ->assertSee('wire:target="save"', false); + ->assertSee('wire:target="save"', false) + ->assertSee('size-5 text-current', false) + ->assertDontSee('text-primary"', false); $this->blade('') ->assertSee('wire:target="upload"', false);