Skip to content

Commit a7f234d

Browse files
adhami3310Kastier1
andauthored
move tailwind radix map out of styles (#1290)
Co-authored-by: Simon Young <[email protected]>
1 parent c49744b commit a7f234d

File tree

4 files changed

+5
-4
lines changed

4 files changed

+5
-4
lines changed

pcweb/components/docpage/navbar/navmenu/navmenu.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
"""Reflex custom component NavMenu."""
22

3+
from types import SimpleNamespace
34
import reflex as rx
45
from typing import Any, Dict, Literal
56
from reflex.vars import Var
@@ -101,7 +102,7 @@ class NavMenuViewport(NavMenu):
101102
)
102103

103104

104-
class NavMenu(rx.Component):
105+
class NavMenu(SimpleNamespace):
105106
"""NavMenu component."""
106107

107108
root = staticmethod(NavMenuRoot.create)

pcweb/pages/docs/component.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -957,13 +957,13 @@ def same_trigger(t1, t2):
957957
return args1 == args2
958958

959959

960-
def generate_event_triggers(comp, src):
960+
def generate_event_triggers(comp: type[Component], src):
961961
prop_name_to_description = {
962962
prop.name: prop.description
963963
for prop in src.get_props()
964964
if prop.name.startswith("on_")
965965
}
966-
triggers = comp().get_event_triggers()
966+
triggers = comp._unsafe_create(children=[]).get_event_triggers()
967967
custom_events = [
968968
event
969969
for event in triggers

tailwind_config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from pcweb.styles.tailwind_radix_map import radix_colors_dict, custom_colors_dict
1+
from tailwind_radix_map import radix_colors_dict, custom_colors_dict
22

33
tw_config = {
44
"plugins": ["@tailwindcss/typography", "tailwindcss-radix"],

0 commit comments

Comments
 (0)