@patreon/studio
Version:
Patreon Studio Design System
40 lines (39 loc) • 866 B
TypeScript
import type { IconComponent } from '../Icon/types';
export interface PillProps {
/**
* Boolean to display the selected or unselected styles.
*/
selected?: boolean;
/**
* Size of `Pill`
*/
size?: 'sm' | 'md';
/**
* `Pill` content
*/
children: React.ReactNode;
/**
* The icon to to display on the left side of `Pill`
*/
icon?: IconComponent & {
iconName: string;
};
/**
* The icon to to display on the right side of `Pill`
*/
disclosureIcon?: IconComponent & {
iconName: string;
};
/**
* Callback function for Pill click.
*/
onClick?: (e: React.MouseEvent<HTMLButtonElement>) => void;
/**
* Mark Pill as disabled.
*/
disabled?: boolean;
/**
* String descriptor for testing
*/
'data-tag'?: string;
}