Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
2 changes: 1 addition & 1 deletion pyi_hashes.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
"reflex/components/radix/primitives/__init__.pyi": "68fcf93acb9a40d94561d375a3a5fdb1",
"reflex/components/radix/primitives/accordion.pyi": "9192299dac04a5172edd7b2f6b125f53",
"reflex/components/radix/primitives/base.pyi": "336f5e26669a809454bb343e698ab563",
"reflex/components/radix/primitives/drawer.pyi": "5c04c3598100aa4d562c242fabf7e404",
"reflex/components/radix/primitives/drawer.pyi": "c6ad2f60217fe25952f3a1ba88fbd72a",
"reflex/components/radix/primitives/form.pyi": "8a5ec180a50acdc35dfe53e4e65c20e0",
"reflex/components/radix/primitives/progress.pyi": "b26c99c1d827c0f599fff344746aeec3",
"reflex/components/radix/primitives/slider.pyi": "c03b716ffbbc3e1a0c766951de04e83b",
Expand Down
28 changes: 8 additions & 20 deletions reflex/components/radix/primitives/drawer.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,13 +124,13 @@ class DrawerContent(DrawerComponent):
alias = "Vaul" + tag

# Style set partially based on the source code at https://ui.shadcn.com/docs/components/drawer
def _get_style(self) -> dict:
def add_style(self) -> dict:
"""Get the style for the component.

Returns:
The dictionary of the component style as value and the style notation as key.
"""
base_style = {
return {
"left": "0",
"right": "0",
"bottom": "0",
Expand All @@ -139,9 +139,6 @@ def _get_style(self) -> dict:
"z_index": 50,
"display": "flex",
}
style = self.style or {}
base_style.update(style)
return {"css": base_style}

# Fired when the drawer content is opened.
on_open_auto_focus: EventHandler[no_args_event_spec]
Expand Down Expand Up @@ -186,13 +183,13 @@ class DrawerOverlay(DrawerComponent):
alias = "Vaul" + tag

# Style set based on the source code at https://ui.shadcn.com/docs/components/drawer
def _get_style(self) -> dict:
def add_style(self) -> dict:
"""Get the style for the component.

Returns:
The dictionary of the component style as value and the style notation as key.
"""
base_style = {
return {
"position": "fixed",
"left": "0",
"right": "0",
Expand All @@ -201,9 +198,6 @@ def _get_style(self) -> dict:
"z_index": 50,
"background": "rgba(0, 0, 0, 0.5)",
}
style = self.style or {}
base_style.update(style)
return {"css": base_style}


class DrawerClose(DrawerTrigger):
Expand All @@ -222,21 +216,18 @@ class DrawerTitle(DrawerComponent):
alias = "Vaul" + tag

# Style set based on the source code at https://ui.shadcn.com/docs/components/drawer
def _get_style(self) -> dict:
def add_style(self) -> dict:
"""Get the style for the component.

Returns:
The dictionary of the component style as value and the style notation as key.
"""
base_style = {
return {
"font-size": "1.125rem",
"font-weight": "600",
"line-weight": "1",
"letter-spacing": "-0.05em",
}
style = self.style or {}
base_style.update(style)
return {"css": base_style}


class DrawerDescription(DrawerComponent):
Expand All @@ -247,18 +238,15 @@ class DrawerDescription(DrawerComponent):
alias = "Vaul" + tag

# Style set based on the source code at https://ui.shadcn.com/docs/components/drawer
def _get_style(self) -> dict:
def add_style(self) -> dict:
"""Get the style for the component.

Returns:
The dictionary of the component style as value and the style notation as key.
"""
base_style = {
return {
"font-size": "0.875rem",
}
style = self.style or {}
base_style.update(style)
return {"css": base_style}


class DrawerHandle(DrawerComponent):
Expand Down
Loading