UNPKG

@mabi-ui/radio

Version:

Radio group and radio button components for Mabi-UI

29 lines (25 loc) 927 B
import { cva, VariantProps } from 'class-variance-authority'; import { AriaRadioProps, HoverProps } from 'react-aria'; import React, { FC } from 'react'; declare const checkbox: ReturnType<typeof cva<CvaConfig>>; type RadioButtonProps = { className?: string | ((props: { isSelected: boolean; isDisabled: boolean; isPressed: boolean; isFocusVisible: boolean; isHovered: boolean; }) => string); selectedIcon?: React.ReactNode; unselectedIcon?: React.ReactNode; } & Omit<AriaRadioProps, "children"> & HoverProps & ({ label: string; "aria-label"?: never; children?: never; } | { "aria-label": string; label?: never; children?: React.ReactNode; }) & Omit<VariantProps<typeof checkbox>, "isHovered" | "isPressed" | "isFocusVisible" | "isDisabled" | "color">; declare const RadioButton: FC<RadioButtonProps>; export { RadioButton, RadioButtonProps };