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

Add success variant to button component #943

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions stubs/resources/views/flux/button/index.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@
'filled' => 'bg-zinc-800/5 hover:bg-zinc-800/10 dark:bg-white/10 dark:hover:bg-white/20',
'outline' => 'bg-white hover:bg-zinc-50 dark:bg-zinc-700 dark:hover:bg-zinc-600/75',
'danger' => 'bg-red-500 hover:bg-red-600 dark:bg-red-600 dark:hover:bg-red-500',
'success' => 'bg-green-500 hover:bg-green-600 dark:bg-green-600 dark:hover:bg-green-500',
'ghost' => 'bg-transparent hover:bg-zinc-800/5 dark:hover:bg-white/15',
'subtle' => 'bg-transparent hover:bg-zinc-800/5 dark:hover:bg-white/15',
})
Expand All @@ -71,6 +72,7 @@
'filled' => 'text-zinc-800 dark:text-white',
'outline' => 'text-zinc-800 dark:text-white',
'danger' => 'text-white',
'success' => 'text-white',
'ghost' => 'text-zinc-800 dark:text-white',
'subtle' => 'text-zinc-400 hover:text-zinc-800 dark:text-zinc-400 dark:hover:text-white',
})
Expand All @@ -82,6 +84,7 @@
->add(match ($variant) { // Shadows...
'primary' => 'shadow-[inset_0px_1px_theme(colors.white/.2)]',
'danger' => 'shadow-[inset_0px_1px_theme(colors.red.500),inset_0px_2px_theme(colors.white/.15)] dark:shadow-none',
'success' => 'shadow-[inset_0px_1px_theme(colors.green.500),inset_0px_2px_theme(colors.white/.15)] dark:shadow-none',
'outline' => match ($size) {
'base' => 'shadow-sm',
'sm' => 'shadow-sm',
Expand All @@ -95,6 +98,7 @@
'outline' => '[[data-flux-button-group]_&]:border-l-0 [:is([data-flux-button-group]>&:first-child,_[data-flux-button-group]_:first-child>&)]:border-l-[1px]',
'filled' => '[[data-flux-button-group]_&]:border-r [:is([data-flux-button-group]>&:last-child,_[data-flux-button-group]_:last-child>&)]:border-r-0 [[data-flux-button-group]_&]:border-zinc-200/80 [[data-flux-button-group]_&]:dark:border-zinc-900/50',
'danger' => '[[data-flux-button-group]_&]:border-r [:is([data-flux-button-group]>&:last-child,_[data-flux-button-group]_:last-child>&)]:border-r-0 [[data-flux-button-group]_&]:border-red-600 [[data-flux-button-group]_&]:dark:border-red-900/25',
'success' => '[[data-flux-button-group]_&]:border-r [:is([data-flux-button-group]>&:last-child,_[data-flux-button-group]_:last-child>&)]:border-r-0 [[data-flux-button-group]_&]:border-green-600 [[data-flux-button-group]_&]:dark:border-green-900/25',
'primary' => '[[data-flux-button-group]_&]:border-r-0 [:is([data-flux-button-group]>&:last-child,_[data-flux-button-group]_:last-child>&)]:border-r-[1px] dark:[:is([data-flux-button-group]>&:last-child,_[data-flux-button-group]_:last-child>&)]:border-r-0 dark:[:is([data-flux-button-group]>&:last-child,_[data-flux-button-group]_:last-child>&)]:border-l-[1px] [:is([data-flux-button-group]>&:not(:first-child),_[data-flux-button-group]_:not(:first-child)>&)]:border-l-[color-mix(in_srgb,var(--color-accent-foreground),transparent_85%)]',
})
->add($loading ? [ // Loading states...
Expand Down