add popover props
This commit is contained in:
parent
f45dcd9253
commit
c59ea23603
@ -1,6 +1,6 @@
|
|||||||
"""Interactive components provided by @radix-ui/themes."""
|
"""Interactive components provided by @radix-ui/themes."""
|
||||||
|
|
||||||
from typing import Literal
|
from typing import Dict, List, Literal, Union
|
||||||
|
|
||||||
from reflex.components.component import ComponentNamespace
|
from reflex.components.component import ComponentNamespace
|
||||||
from reflex.components.core.breakpoints import Responsive
|
from reflex.components.core.breakpoints import Responsive
|
||||||
@ -28,6 +28,9 @@ class PopoverRoot(RadixThemesComponent):
|
|||||||
# Fired when the open state changes.
|
# Fired when the open state changes.
|
||||||
on_open_change: EventHandler[identity_event(bool)]
|
on_open_change: EventHandler[identity_event(bool)]
|
||||||
|
|
||||||
|
# The open state of the popover when it is initially rendered. Use when you do not need to control its open state.
|
||||||
|
default_open: Var[bool]
|
||||||
|
|
||||||
|
|
||||||
class PopoverTrigger(RadixThemesTriggerComponent):
|
class PopoverTrigger(RadixThemesTriggerComponent):
|
||||||
"""Wraps the control that will open the popover."""
|
"""Wraps the control that will open the popover."""
|
||||||
@ -58,6 +61,15 @@ class PopoverContent(elements.Div, RadixThemesComponent):
|
|||||||
# When true, overrides the side andalign preferences to prevent collisions with boundary edges.
|
# When true, overrides the side andalign preferences to prevent collisions with boundary edges.
|
||||||
avoid_collisions: Var[bool]
|
avoid_collisions: Var[bool]
|
||||||
|
|
||||||
|
# The distance in pixels from the boundary edges where collision detection should occur. Accepts a number (same for all sides), or a partial padding object, for example: { "top": 20, "left": 20 }. Defaults to 0.
|
||||||
|
collision_padding: Var[Union[float, int, Dict[str, Union[float, int]]]]
|
||||||
|
|
||||||
|
# The sticky behavior on the align axis. "partial" will keep the content in the boundary as long as the trigger is at least partially in the boundary whilst "always" will keep the content in the boundary regardless. Defaults to "partial".
|
||||||
|
sticky: Var[Literal["partial", "always"]]
|
||||||
|
|
||||||
|
# Whether to hide the content when the trigger becomes fully occluded. Defaults to False.
|
||||||
|
hide_when_detached: Var[bool]
|
||||||
|
|
||||||
# Fired when the dialog is opened.
|
# Fired when the dialog is opened.
|
||||||
on_open_auto_focus: EventHandler[empty_event]
|
on_open_auto_focus: EventHandler[empty_event]
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user