Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Livewire V2 #23

Merged
merged 9 commits into from
Sep 2, 2020
Prev Previous commit
Next Next commit
Bake disabled button state (opacity-25) into class list
  • Loading branch information
calebporzio committed Sep 2, 2020
commit 34fa9ff030f56cde201ccbb890d8dbbd08ebf3a7
2 changes: 1 addition & 1 deletion resources/views/components/button.blade.php
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<button {{ $attributes->merge(['type' => 'submit', 'class' => 'inline-flex items-center px-4 py-2 bg-gray-800 border border-transparent rounded-md font-semibold text-xs text-white uppercase tracking-widest hover:bg-gray-700 active:bg-gray-900 focus:outline-none focus:border-gray-900 focus:shadow-outline-gray transition ease-in-out duration-150']) }}>
<button {{ $attributes->merge(['type' => 'submit', 'class' => 'inline-flex items-center px-4 py-2 bg-gray-800 border border-transparent rounded-md font-semibold text-xs text-white uppercase tracking-widest hover:bg-gray-700 active:bg-gray-900 focus:outline-none focus:border-gray-900 focus:shadow-outline-gray disabled:opacity-25 transition ease-in-out duration-150']) }}>
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added disabled:opacity-25 so that opacity is automatically handled by CSS rather than wire:loading.class="opacity-25".

Note: I didn't re-build the CSS, so I'm guessing this class is missing from the build because of PurgeCSS.

{{ $slot }}
</button>