import type { ChangeEvent, ReactNode, MouseEvent } from 'react'; import React from 'react'; type PillType = 'none' | 'checkbox' | 'radio'; type Position = 'auto' | 'left' | 'right' | 'middle'; interface Props { /** * Unique ID * * This ID is used to associate the label with the input for * "checkbox" and "radio" types. For "none" types, the ID * is applied directly to the button element. */ id: string; /** * Name of the input element */ name?: string; /** * Allows to change the functionality of component while retaining style * * @param {PillType} none Acts as a button * @param {PillType} checkbox Acts as a checkbox input type * @param {PillType} radio Acts as a radiobutton input type * * @default 'none' */ type?: PillType; /** * Default value of input element * * @default undefined */ value?: string | number; /** * On checkbox/radiobutton change callback */ onChange?: (e: ChangeEvent) => void; /** * Allows to set position of component relative to other in line content by adding appropriate margins * * @param {Position} auto Pill component is grouped with other pill components, add margins in between * @param {Position} left Pill component is on the left side of content, add right margin * @param {Position} right Pill component is on the right side of content, add left margin * @param {Position} middle Pill component is in the middle of content, add left and right margins * * @default undefined */ position?: Position; /** * Allows to set checkbox/radiobutton as checked * * @default false */ isChecked?: boolean; /** * Allows to set checkbox/radiobutton as checked by default * * @default false */ isDefaultChecked?: boolean; /** * Allows to disable checkbox/radiobutton functionality * * @default false */ isDisabled?: boolean; /** * Content of the component */ children?: ReactNode; /** * Allows to pass testid string for testing purposes */ 'data-testid'?: string; /** * Allows to pass a custom className */ className?: string; /** * A styled version that is designed to look like the default Button component */ isDefaultButtonStyle?: boolean; /** * A screen reader label that describes the purpose of the Pill component when the default text is not sufficiently descriptive. */ ariaLabel?: string; /** * A function that is called when the Pill component behaves like a button and is clicked. */ onClick?: (e: MouseEvent) => void; } declare const Pill: ({ type, "data-testid": dataTestId, ...props }: Props) => React.JSX.Element; /** @component */ export default Pill; export { PillType, Position };