Skip to content

Commit a4ebb0b

Browse files
authored
Fix incorrect fragment import in radix themes callout component. (#6366)
* Fix incorrect `fragment` import in radix themes `callout` component. * fix pyi_hashes
1 parent 9ee70de commit a4ebb0b

3 files changed

Lines changed: 29 additions & 2 deletions

File tree

packages/reflex-components-radix/src/reflex_components_radix/themes/components/callout.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
from reflex_base.components.component import Component, ComponentNamespace, field
66
from reflex_base.vars.base import Var
7-
from reflex_components_core.base import fragment
7+
from reflex_components_core.base.fragment import fragment
88
from reflex_components_core.core.breakpoints import Responsive
99
from reflex_components_core.el import elements
1010

pyi_hashes.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@
6161
"packages/reflex-components-radix/src/reflex_components_radix/themes/components/avatar.pyi": "1671e796449b236386d8f53d33e42b2f",
6262
"packages/reflex-components-radix/src/reflex_components_radix/themes/components/badge.pyi": "9fde9929ca5197e0e1880bce9a08e926",
6363
"packages/reflex-components-radix/src/reflex_components_radix/themes/components/button.pyi": "e5d6387a93c74dafaa0d6f1719e08bac",
64-
"packages/reflex-components-radix/src/reflex_components_radix/themes/components/callout.pyi": "09487ef45cf26edb0b7c1d6da5f097f0",
64+
"packages/reflex-components-radix/src/reflex_components_radix/themes/components/callout.pyi": "31da62c4d8c1d459089aab32cd232feb",
6565
"packages/reflex-components-radix/src/reflex_components_radix/themes/components/card.pyi": "76afb58340c6be1f26b7b110473efa55",
6666
"packages/reflex-components-radix/src/reflex_components_radix/themes/components/checkbox.pyi": "6cbf013e21d7280118dfd7383998b3bf",
6767
"packages/reflex-components-radix/src/reflex_components_radix/themes/components/checkbox_cards.pyi": "63b4134246f68f9f556896d6ce194462",
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
from reflex_components_core.base.fragment import Fragment
2+
from reflex_components_lucide.icon import Icon
3+
from reflex_components_radix.themes.components.callout import (
4+
Callout,
5+
CalloutIcon,
6+
CalloutRoot,
7+
CalloutText,
8+
)
9+
10+
11+
def test_callout_create_without_icon():
12+
component = Callout.create("You will need admin privileges.")
13+
14+
assert isinstance(component, CalloutRoot)
15+
assert len(component.children) == 2
16+
assert isinstance(component.children[0], Fragment)
17+
assert isinstance(component.children[1], CalloutText)
18+
19+
20+
def test_callout_create_with_icon():
21+
component = Callout.create("You will need admin privileges.", icon="info")
22+
23+
assert isinstance(component, CalloutRoot)
24+
assert len(component.children) == 2
25+
assert isinstance(component.children[0], CalloutIcon)
26+
assert isinstance(component.children[0].children[0], Icon)
27+
assert isinstance(component.children[1], CalloutText)

0 commit comments

Comments
 (0)