From 87798801fcc49bcddbcee818cb8e0c7da774d295 Mon Sep 17 00:00:00 2001 From: Johnny Date: Mon, 12 May 2025 09:09:09 +0800 Subject: [PATCH] fix: list styles --- web/src/components/MemoContent/List.tsx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/web/src/components/MemoContent/List.tsx b/web/src/components/MemoContent/List.tsx index 87660146f..983c2f8a2 100644 --- a/web/src/components/MemoContent/List.tsx +++ b/web/src/components/MemoContent/List.tsx @@ -43,8 +43,11 @@ const List: React.FC = ({ kind, indent, children }: Props) => { return React.createElement( getListContainer(), { - className: cn(kind === ListNode_Kind.ORDERED ? "list-decimal" : kind === ListNode_Kind.UNORDERED ? "list-disc" : "list-none"), - style: { paddingLeft: `${(2 * indent + 6) * 4}px` }, + className: cn( + "list-inside break-all", + kind === ListNode_Kind.ORDERED ? "list-decimal" : kind === ListNode_Kind.UNORDERED ? "list-disc" : "list-none", + ), + style: { paddingLeft: `${indent * 6}px` }, ...getAttributes(), }, children.map((child, index) => {