From 1f10994f907f61ec43a387821c99cade1e7a98d8 Mon Sep 17 00:00:00 2001 From: Vixalie Date: Tue, 12 Aug 2025 22:37:15 +0800 Subject: [PATCH] =?UTF-8?q?refactor(components):=20=E4=BC=98=E5=8C=96?= =?UTF-8?q?=E5=A4=8D=E9=80=89=E6=A1=86=E7=BB=84=E4=BB=B6=E7=9A=84=E6=A0=B7?= =?UTF-8?q?=E5=BC=8F=E5=92=8C=E8=A1=8C=E4=B8=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 修改选中状态下的 CheckIcon 渲染逻辑 - 增加 disabled 属性以控制图标样式 - 优化 Check 组件内部的逻辑和结构 --- src/components/Check.tsx | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/components/Check.tsx b/src/components/Check.tsx index 837695f..58c9625 100644 --- a/src/components/Check.tsx +++ b/src/components/Check.tsx @@ -20,7 +20,13 @@ interface CheckBoxProps { const CheckIcon = [ () => , - () => , + (props) => ( + + ), ]; const Check: ParentComponent = (props) => { @@ -53,7 +59,7 @@ const Check: ParentComponent = (props) => { class="flex flex-row items-center gap-1 cursor-pointer" classList={{ 'text-neutral': mProps.disabled }} onClick={handleClick}> - +
{mProps.children}