@@ -114,11 +114,9 @@ def _render_spans(spans: tuple[Span, ...]) -> list[rx.Component | str]:
114114 case TextSpan (text = text ):
115115 out .append (text )
116116 case BoldSpan (children = children ):
117- out .append (
118- rx .text (rx .text .strong (* _render_spans (children )), as_ = "span" )
119- )
117+ out .append (rx .el .strong (* _render_spans (children )))
120118 case ItalicSpan (children = children ):
121- out .append (rx .text ( rx . text . em (* _render_spans (children )), as_ = "span" ))
119+ out .append (rx .el . em (* _render_spans (children )))
122120 case StrikethroughSpan (children = children ):
123121 inner = "" .join (
124122 c if isinstance (c , str ) else "" for c in _render_spans (children )
@@ -346,10 +344,10 @@ def text_span(self, span: TextSpan) -> rx.Component:
346344 return rx .text (span .text , as_ = "span" )
347345
348346 def bold (self , span : BoldSpan ) -> rx .Component :
349- return rx .text ( rx . text . strong (* self .transform_spans (span .children )), as_ = "span" )
347+ return rx .el . strong (* self .transform_spans (span .children ))
350348
351349 def italic (self , span : ItalicSpan ) -> rx .Component :
352- return rx .text ( rx . text . em (* self .transform_spans (span .children )), as_ = "span" )
350+ return rx .el . em (* self .transform_spans (span .children ))
353351
354352 def strikethrough (self , span : StrikethroughSpan ) -> rx .Component :
355353 return rx .text ("~" , * self .transform_spans (span .children ), "~" , as_ = "span" )
@@ -517,8 +515,7 @@ def title_comp() -> rx.Component:
517515 trigger .append (
518516 rx .box (
519517 self ._render_children (children ),
520- class_name = "font-[475]" ,
521- color = f"{ rx .color (color , 11 )} " ,
518+ class_name = "font-[475] !text-m-slate-8 dark:!text-m-slate-6" ,
522519 ),
523520 )
524521 body = rx .fragment ()
0 commit comments