diff --git a/packages/for-ui/src/checkbox/Checkbox.tsx b/packages/for-ui/src/checkbox/Checkbox.tsx index dfdcb7f9e..aac627166 100644 --- a/packages/for-ui/src/checkbox/Checkbox.tsx +++ b/packages/for-ui/src/checkbox/Checkbox.tsx @@ -1,11 +1,11 @@ -import { FC, forwardRef, ReactNode } 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'; -export type CheckboxProps = MuiCheckboxProps & { +type InternalCheckboxProps = MuiCheckboxProps & { label?: ReactNode; nopadding?: boolean; className?: string; @@ -32,7 +32,7 @@ const Indicator: FC<{ state: 'default' | 'checked' | 'intermediate'; disabled: b ); -export const Checkbox = forwardRef( +export const Checkbox = forwardRef( ({ label, nopadding = false, disabled, className, ...rest }, ref) => ( ( ), ); + +export type CheckboxProps = ComponentPropsWithRef; diff --git a/packages/for-ui/src/radio/Radio.tsx b/packages/for-ui/src/radio/Radio.tsx index 8edd072f4..4c328bccb 100644 --- a/packages/for-ui/src/radio/Radio.tsx +++ b/packages/for-ui/src/radio/Radio.tsx @@ -1,10 +1,10 @@ -import { FC, forwardRef, ReactNode } from 'react'; +import { ComponentPropsWithRef, FC, forwardRef, ReactNode } from 'react'; import MuiRadio, { RadioProps as MuiRadioProps } from '@mui/material/Radio'; import { fsx } from '../system/fsx'; import { TextDefaultStyler } from '../system/TextDefaultStyler'; import { Text } from '../text'; -export type RadioProps = Omit & { +type InternalRadioProps = Omit & { label?: ReactNode; nopadding?: boolean; className?: string; @@ -20,7 +20,7 @@ const Indicator: FC<{ checked: boolean; disabled: boolean }> = ({ checked, disab /> ); -export const Radio = forwardRef( +export const Radio = forwardRef( ({ nopadding, label, value, disabled, className, ...rest }, ref) => ( ( ), ); + +export type RadioProps = ComponentPropsWithRef;