This commit is contained in:
liubiren 2026-07-29 08:54:53 +08:00
parent 7b89324981
commit a6bf6dbac3
1 changed files with 23 additions and 23 deletions

View File

@ -475,17 +475,17 @@ def dialog_showing(item: Tuple[str, Dialog]) -> rx.Component:
component_map={ component_map={
"p": lambda text: rx.text( "p": lambda text: rx.text(
text, text,
margin="6px 0", margin="4px 0",
line_height="1.5", line_height="1.75",
word_wrap="break-word", word_wrap="break-word",
word_break="break-all", word_break="break-all",
white_space="pre-line", white_space="pre-line",
), ),
"h1": lambda text: rx.text( "h1": lambda text: rx.text(
text, text,
margin="12px 0 6px", margin="8px 0 4px",
line_height="1.5", line_height="1.75",
font_size="20px", font_size="18px",
font_weight="var(--prismui-font-weight-3)", font_weight="var(--prismui-font-weight-3)",
word_wrap="break-word", word_wrap="break-word",
word_break="break-all", word_break="break-all",
@ -493,9 +493,9 @@ def dialog_showing(item: Tuple[str, Dialog]) -> rx.Component:
), ),
"h2": lambda text: rx.text( "h2": lambda text: rx.text(
text, text,
margin="10px 0 6px", margin="6px 0 4px",
line_height="1.5", line_height="1.75",
font_size="18px", font_size="16px",
font_weight="var(--prismui-font-weight-3)", font_weight="var(--prismui-font-weight-3)",
word_wrap="break-word", word_wrap="break-word",
word_break="break-all", word_break="break-all",
@ -503,9 +503,8 @@ def dialog_showing(item: Tuple[str, Dialog]) -> rx.Component:
), ),
"h3": lambda text: rx.text( "h3": lambda text: rx.text(
text, text,
margin="8px 0 6px", margin="4px 0",
line_height="1.5", line_height="1.75",
font_size="16px",
font_weight="var(--prismui-font-weight-3)", font_weight="var(--prismui-font-weight-3)",
word_wrap="break-word", word_wrap="break-word",
word_break="break-all", word_break="break-all",
@ -519,37 +518,38 @@ def dialog_showing(item: Tuple[str, Dialog]) -> rx.Component:
"ul": lambda children: rx.vstack( "ul": lambda children: rx.vstack(
children, children,
align_items="flex-start", align_items="flex-start",
margin="6px 0", margin="4px 0",
style={"padding": "0 !important"}, style={"padding": "0 !important"},
), ),
"ol": lambda children: rx.vstack( "ol": lambda children: rx.vstack(
children, children,
align_items="flex-start", align_items="flex-start",
margin="6px 0", margin="4px 0",
style={"padding": "0 !important"}, style={"padding": "0 !important"},
), ),
"li": lambda text: rx.hstack( "li": lambda text: rx.hstack(
rx.icon( rx.box(
"dot", width="4.5px",
flex_shrink="0", height="4.5px",
width="21px", margin_right="8px",
height="21px", background_color="var(--prismui-color-5)",
color="var(--prismui-color-5)", border_radius="50%",
), ),
rx.text( rx.text(
text, text,
line_height="1.5", line_height="1.75",
word_wrap="break-word", word_wrap="break-word",
word_break="break-all", word_break="break-all",
white_space="pre-line", white_space="pre-line",
), ),
align_items="flex-start", align_items="center",
margin_bottom="6px", justify_content="flex-start",
margin_bottom="4px",
), ),
"hr": lambda _: rx.divider( "hr": lambda _: rx.divider(
height="1px", height="1px",
margin="12px 0", margin="12px 0",
background_color="transparent", background_color="var(--prismui-background-color-6)",
), ),
"table": lambda children: rx.el.table( "table": lambda children: rx.el.table(
children, children,