From d0fb2cbb312e965d37d5e68cc94d168172ef8e84 Mon Sep 17 00:00:00 2001 From: Yang Date: Fri, 15 Sep 2023 14:02:17 +0800 Subject: [PATCH] chore: checkbox mini --- packages/zarm/src/checkbox/Checkbox.mini.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/zarm/src/checkbox/Checkbox.mini.tsx b/packages/zarm/src/checkbox/Checkbox.mini.tsx index ef24be463..2a1f2ae26 100644 --- a/packages/zarm/src/checkbox/Checkbox.mini.tsx +++ b/packages/zarm/src/checkbox/Checkbox.mini.tsx @@ -2,7 +2,7 @@ import { BaseEventOrig, Label, Switch, SwitchProps, View } from '@tarojs/compone import { createBEM } from '@zarm-design/bem'; import { Minus as MinusIcon, Success as SuccessIcon } from '@zarm-design/icons'; import includes from 'lodash/includes'; -import React, { forwardRef, ReactNode, useContext, useEffect, useMemo, useState } from 'react'; +import React, { ReactNode, useContext, useEffect, useMemo, useState } from 'react'; import Button from '../button/index.mini'; import { ConfigContext } from '../config-provider'; import List from '../list'; @@ -23,7 +23,7 @@ const getChecked = (props: CheckboxProps, defaultChecked?: boolean) => { return props.checked ?? props.defaultChecked ?? defaultChecked; }; -const Checkbox = forwardRef((props, ref) => { +const Checkbox = (props: CheckboxProps) => { let [checked, setChecked] = useState(getChecked(props, false)); let { disabled } = props; @@ -160,7 +160,7 @@ const Checkbox = forwardRef((props, ref) => { {inputRender} ); -}); +}; Checkbox.displayName = 'Checkbox';