Skip to content

Commit 94e4533

Browse files
committed
add data slots
1 parent fa94fea commit 94e4533

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

reflex_ui/components/base/tooltip.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ class TooltipProvider(TooltipBaseComponent):
5353
@classmethod
5454
def create(cls, *children, **props) -> Component:
5555
"""Create the tooltip provider component."""
56+
props["data-slot"] = "tooltip-provider"
5657
return super().create(*children, **props)
5758

5859

@@ -91,6 +92,7 @@ class TooltipRoot(TooltipBaseComponent):
9192
@classmethod
9293
def create(cls, *children, **props) -> Component:
9394
"""Create the tooltip root component."""
95+
props["data-slot"] = "tooltip-root"
9496
return super().create(*children, **props)
9597

9698

@@ -105,6 +107,7 @@ class TooltipTrigger(TooltipBaseComponent):
105107
@classmethod
106108
def create(cls, *children, **props) -> Component:
107109
"""Create the tooltip trigger component."""
110+
props["data-slot"] = "tooltip-trigger"
108111
cls.set_class_name(ClassNames.TRIGGER, props)
109112
return super().create(*children, **props)
110113

@@ -168,6 +171,7 @@ class TooltipPositioner(TooltipBaseComponent):
168171
@classmethod
169172
def create(cls, *children, **props) -> Component:
170173
"""Create the tooltip positioner component."""
174+
props["data-slot"] = "tooltip-positioner"
171175
return super().create(*children, **props)
172176

173177

@@ -182,6 +186,7 @@ class TooltipPopup(TooltipBaseComponent):
182186
@classmethod
183187
def create(cls, *children, **props) -> Component:
184188
"""Create the tooltip popup component."""
189+
props["data-slot"] = "tooltip-popup"
185190
cls.set_class_name(ClassNames.POPUP, props)
186191
return super().create(*children, **props)
187192

@@ -194,6 +199,7 @@ class TooltipArrow(TooltipBaseComponent):
194199
@classmethod
195200
def create(cls, *children, **props) -> Component:
196201
"""Create the tooltip arrow component."""
202+
props["data-slot"] = "tooltip-arrow"
197203
cls.set_class_name(ClassNames.ARROW, props)
198204
return super().create(*children, **props)
199205

@@ -233,6 +239,7 @@ class HighLevelTooltip(TooltipRoot):
233239
"position_method",
234240
"track_anchor",
235241
"collision_avoidance",
242+
"class_name",
236243
}
237244

238245
@classmethod

0 commit comments

Comments
 (0)