-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(snackbar): add snackbar positionning
- Loading branch information
Showing
6 changed files
with
102 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,22 @@ | ||
import { cva } from 'class-variance-authority' | ||
import { cva, type VariantProps } from 'class-variance-authority' | ||
|
||
export const snackbarRegionVariant = cva([ | ||
'fixed bottom-lg inset-x-none z-toast', | ||
'outline-none pointer-events-none', | ||
'flex flex-col items-center gap-lg', | ||
]) | ||
export const snackbarRegionVariant = cva( | ||
['fixed inset-x-lg z-toast group', 'outline-none pointer-events-none', 'flex flex-col gap-lg'], | ||
{ | ||
variants: { | ||
position: { | ||
top: 'top-lg items-center', | ||
'top-right': 'top-lg items-end', | ||
'top-left': 'top-lg items-start', | ||
bottom: 'bottom-lg items-center', | ||
'bottom-right': 'bottom-lg items-end', | ||
'bottom-left': 'bottom-lg items-start', | ||
}, | ||
}, | ||
defaultVariants: { | ||
position: 'bottom', | ||
}, | ||
} | ||
) | ||
|
||
export type SnackbarRegionVariantProps = VariantProps<typeof snackbarRegionVariant> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters