reablocks
Version:
Component library for React
51 lines (50 loc) • 1.29 kB
TypeScript
import { default as React, FC, LegacyRef, ReactElement } from 'react';
import { ChipTheme } from './ChipTheme';
export interface ChipProps extends React.HTMLAttributes<HTMLDivElement> {
/**
* Color variant for the chip.
* @default 'default'
*/
color?: 'default' | 'primary' | 'secondary' | 'error' | 'success' | 'warning' | 'info' | string;
/**
* Size variant for the chip.
* @default 'medium'
*/
size?: 'small' | 'medium' | 'large' | string;
/**
* Style variant for the chip.
* @default 'filled'
*/
variant?: 'filled' | 'outline' | string;
/**
* Whether the chip is selected.
*/
selected?: boolean;
/**
* Whether the chip is disabled.
*/
disabled?: boolean;
/**
* Whether to disable the margins.
*/
disableMargins?: boolean;
/**
* Content to display before the chip label.
*/
start?: ReactElement | string;
/**
* Content to display after the chip label.
*/
end?: ReactElement | string;
/**
* Theme for the Chip.
*/
theme?: ChipTheme;
}
export interface ChipRef {
/**
* Reference to the root element.
*/
ref?: LegacyRef<HTMLDivElement>;
}
export declare const Chip: FC<ChipProps & ChipRef>;