From 481850fc1e8d240cfe3d3869876875828a5384a2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B0=8F=E8=B1=AA?= <1844749591@qq.com> Date: Wed, 20 Nov 2024 10:53:22 +0800 Subject: [PATCH] Revert "feat: improve a11y (#292)" This reverts commit d3de52f96bd39c459a19fd1244e6da6570d75fb8. --- src/index.tsx | 8 +++----- tests/__snapshots__/index.test.tsx.snap | 16 ++++++++-------- 2 files changed, 11 insertions(+), 13 deletions(-) diff --git a/src/index.tsx b/src/index.tsx index 11e557a..aac4eee 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -38,12 +38,11 @@ export const Checkbox = forwardRef((props, ref) => { type = 'checkbox', title, onChange, - children, ...inputProps } = props; const inputRef = useRef(null); - const holderRef = useRef(null); + const holderRef = useRef(null); const [rawValue, setRawValue] = useMergedState(defaultChecked, { value: checked, @@ -91,7 +90,7 @@ export const Checkbox = forwardRef((props, ref) => { }; return ( - + ); }); diff --git a/tests/__snapshots__/index.test.tsx.snap b/tests/__snapshots__/index.test.tsx.snap index 88a68cf..07c12b0 100644 --- a/tests/__snapshots__/index.test.tsx.snap +++ b/tests/__snapshots__/index.test.tsx.snap @@ -1,7 +1,7 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`rc-checkbox click checkbox 1`] = ` - + `; exports[`rc-checkbox click radio 1`] = ` - + `; exports[`rc-checkbox control mode 1`] = ` - + `; exports[`rc-checkbox works 1`] = ` - + `;