Pārlūkot izejas kodu

Add alias for Vaul drawer (#2586)

Alek Petuskey 1 gadu atpakaļ
vecāks
revīzija
de30e15b1d
1 mainītis faili ar 16 papildinājumiem un 0 dzēšanām
  1. 16 0
      reflex/components/radix/primitives/drawer.py

+ 16 - 0
reflex/components/radix/primitives/drawer.py

@@ -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.