UNPKG

@hhgtech/hhg-components

Version:
31 lines (30 loc) 1.28 kB
import React, { ComponentType, FC } from 'react'; import { DefaultProps, Selectors, RadioGroupProps, MantineSize } from '@mantine/core'; import { TextProps } from "../../mantine"; import useStyles from "./index.styles"; import { IconProps } from "../icons"; export type GenderOptionProps = { value: string; label: string; icon: string | FC<IconProps>; }; export interface GenderOptionControlBaseProps extends DefaultProps<Selectors<typeof useStyles>> { label?: string; availableValue?: string; isBaby?: boolean; genderValue?: { male: string; female: string; }; hideLabel?: boolean; labelTextProps?: Partial<TextProps>; LabelWrapper?: ComponentType<TextProps>; labelText?: TextProps; type?: 'button' | 'radio'; gap?: number; size?: MantineSize; onChange?: (value: string) => void; } export type GenderOptionControlProps = GenderOptionControlBaseProps & Omit<RadioGroupProps, 'children' | 'styles'>; declare const GenderOptionControl: ({ label, availableValue: availableValueInit, styles, isBaby, genderValue, type, hideLabel, labelTextProps, labelText, gap, size, LabelWrapper, ...radioProps }: GenderOptionControlProps) => React.JSX.Element; export { GenderOptionControl };