Skip to content

Commit

Permalink
remove defaults, clean up type ano
Browse files Browse the repository at this point in the history
  • Loading branch information
martinxu9 committed Jan 26, 2024
1 parent 563bdec commit ce2f9d6
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions reflex/components/radix/primitives/drawer.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,27 +43,27 @@ class DrawerRoot(DrawerComponent):

# Array of numbers from 0 to 100 that corresponds to % of the screen a given snap point should take up. Should go from least visible.
# Also Accept px values, which doesn't take screen height into account.
snap_points: Optional[List[float]]
snap_points: Optional[List[str | float]]

# Index of a snapPoint from which the overlay fade should be applied.
# Defaults to the last snap point.
# TODO: will it accept -1 then?
fade_from_index: Var[int]

# Duration for which the drawer is not draggable after scrolling content inside of the drawer. Defaults to 500ms
scroll_lock_timeout: Var[int] = 500 # type: ignore
scroll_lock_timeout: Var[int]

# When `False`, it allows to interact with elements outside of the drawer without closing it.
# Defaults to `True`.
modal: Var[bool] = True # type: ignore
modal: Var[bool]

# Direction of the drawer. Defaults to `"bottom"`
direction: Var[LiteralDirectionType] = "bottom" # type: ignore
direction: Var[LiteralDirectionType]

# When `True`, it prevents scroll restoration
# when the drawer is closed after a navigation happens inside of it.
# Defaults to `True`.
preventScrollRestoration: Var[bool] = True # type: ignore
preventScrollRestoration: Var[bool]

def get_event_triggers(self) -> Dict[str, Any]:
"""Get the event triggers that pass the component's value to the handler.
Expand All @@ -82,7 +82,7 @@ class DrawerTrigger(DrawerComponent):

tag = "Drawer.Trigger"

as_child: Var[bool] = False # type: ignore
as_child: Var[bool]


class DrawerPortal(DrawerComponent):
Expand Down

0 comments on commit ce2f9d6

Please sign in to comment.