Add alias for Vaul drawer (#2586)

This commit is contained in:
Alek Petuskey 2024-02-12 15:29:45 -08:00 committed by GitHub
parent 5c6a800b62
commit de30e15b1d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -32,6 +32,8 @@ class DrawerRoot(DrawerComponent):
tag = "Drawer.Root"
alias = "Vaul" + tag
# Whether the drawer is open or not.
open: Var[bool]
@ -83,6 +85,8 @@ class DrawerTrigger(DrawerComponent):
tag = "Drawer.Trigger"
alias = "Vaul" + tag
as_child: Var[bool]
@ -91,6 +95,8 @@ class DrawerPortal(DrawerComponent):
tag = "Drawer.Portal"
alias = "Vaul" + tag
# Based on https://www.radix-ui.com/primitives/docs/components/dialog#content
class DrawerContent(DrawerComponent):
@ -98,6 +104,8 @@ class DrawerContent(DrawerComponent):
tag = "Drawer.Content"
alias = "Vaul" + tag
# Style set partially based on the source code at https://ui.shadcn.com/docs/components/drawer
def _get_style(self) -> dict:
"""Get the style for the component.
@ -146,6 +154,8 @@ class DrawerOverlay(DrawerComponent):
tag = "Drawer.Overlay"
alias = "Vaul" + tag
# Style set based on the source code at https://ui.shadcn.com/docs/components/drawer
def _get_style(self) -> dict:
"""Get the style for the component.
@ -177,12 +187,16 @@ class DrawerClose(DrawerComponent):
tag = "Drawer.Close"
alias = "Vaul" + tag
class DrawerTitle(DrawerComponent):
"""A title for the drawer."""
tag = "Drawer.Title"
alias = "Vaul" + tag
# Style set based on the source code at https://ui.shadcn.com/docs/components/drawer
def _get_style(self) -> dict:
"""Get the style for the component.
@ -211,6 +225,8 @@ class DrawerDescription(DrawerComponent):
tag = "Drawer.Description"
alias = "Vaul" + tag
# Style set based on the source code at https://ui.shadcn.com/docs/components/drawer
def _get_style(self) -> dict:
"""Get the style for the component.