Skip to content

Commit

Permalink
chore: checkbox mini
Browse files Browse the repository at this point in the history
  • Loading branch information
Yang committed Sep 15, 2023
1 parent 6cbd001 commit d0fb2cb
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/zarm/src/checkbox/Checkbox.mini.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand All @@ -23,7 +23,7 @@ const getChecked = (props: CheckboxProps, defaultChecked?: boolean) => {
return props.checked ?? props.defaultChecked ?? defaultChecked;
};

const Checkbox = forwardRef<unknown, CheckboxProps>((props, ref) => {
const Checkbox = (props: CheckboxProps) => {
let [checked, setChecked] = useState(getChecked(props, false));
let { disabled } = props;

Expand Down Expand Up @@ -160,7 +160,7 @@ const Checkbox = forwardRef<unknown, CheckboxProps>((props, ref) => {
{inputRender}
</View>
);
});
};

Checkbox.displayName = 'Checkbox';

Expand Down

0 comments on commit d0fb2cb

Please sign in to comment.