Skip to content

Commit

Permalink
Fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
Qs-F committed Apr 8, 2024
1 parent 4bca22b commit c81e433
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions packages/for-ui/src/checkbox/Checkbox.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { FC, forwardRef, ReactNode, ComponentPropsWithRef } from 'react';
import { ComponentPropsWithRef, FC, forwardRef, ReactNode } from 'react';
import { MdCheck, MdRemove } from 'react-icons/md';
import MuiCheckbox, { CheckboxProps as MuiCheckboxProps } from '@mui/material/Checkbox';
import { fsx } from '../system/fsx';
import { TextDefaultStyler } from '../system/TextDefaultStyler';
import { Text } from '../text';

type _CheckboxProps = MuiCheckboxProps & {
type InternalCheckboxProps = MuiCheckboxProps & {
label?: ReactNode;
nopadding?: boolean;
className?: string;
Expand All @@ -32,7 +32,7 @@ const Indicator: FC<{ state: 'default' | 'checked' | 'intermediate'; disabled: b
</span>
);

export const Checkbox = forwardRef<HTMLInputElement, _CheckboxProps>(
export const Checkbox = forwardRef<HTMLInputElement, InternalCheckboxProps>(
({ label, nopadding = false, disabled, className, ...rest }, ref) => (
<Text as="label" className={fsx(`group inline-flex w-fit flex-row items-center gap-1`, className)}>
<MuiCheckbox
Expand All @@ -59,4 +59,4 @@ export const Checkbox = forwardRef<HTMLInputElement, _CheckboxProps>(
),
);

export type CheckboxProps = ComponentPropsWithRef<typeof Checkbox>
export type CheckboxProps = ComponentPropsWithRef<typeof Checkbox>;
6 changes: 3 additions & 3 deletions packages/for-ui/src/radio/Radio.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { fsx } from '../system/fsx';
import { TextDefaultStyler } from '../system/TextDefaultStyler';
import { Text } from '../text';

type _RadioProps = Omit<MuiRadioProps, 'ref'> & {
type InternalRadioProps = Omit<MuiRadioProps, 'ref'> & {
label?: ReactNode;
nopadding?: boolean;
className?: string;
Expand All @@ -20,7 +20,7 @@ const Indicator: FC<{ checked: boolean; disabled: boolean }> = ({ checked, disab
/>
);

export const Radio = forwardRef<HTMLInputElement, _RadioProps>(
export const Radio = forwardRef<HTMLInputElement, InternalRadioProps>(
({ nopadding, label, value, disabled, className, ...rest }, ref) => (
<Text as="label" className={fsx(`inline-flex w-fit flex-row items-center gap-1`, className)}>
<MuiRadio
Expand Down Expand Up @@ -49,4 +49,4 @@ export const Radio = forwardRef<HTMLInputElement, _RadioProps>(
),
);

export type RadioProps = ComponentPropsWithRef<typeof Radio>
export type RadioProps = ComponentPropsWithRef<typeof Radio>;

0 comments on commit c81e433

Please sign in to comment.