File tree Expand file tree Collapse file tree
packages/reflex-components-radix/src/reflex_components_radix/themes/components
tests/units/components/radix Expand file tree Collapse file tree Original file line number Diff line number Diff line change 44
55from reflex_base .components .component import Component , ComponentNamespace , field
66from reflex_base .vars .base import Var
7- from reflex_components_core .base import fragment
7+ from reflex_components_core .base . fragment import fragment
88from reflex_components_core .core .breakpoints import Responsive
99from reflex_components_core .el import elements
1010
Original file line number Diff line number Diff line change 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" ,
Original file line number Diff line number Diff line change 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 )
You can’t perform that action at this time.
0 commit comments