liber-salti
Version:
Saltí - Liber Design System
65 lines (64 loc) • 1.56 kB
TypeScript
import { IconName } from '../Icon/Icon.types';
import { AvatarProps } from '../Avatar/Avatar.types';
export interface ListItemProps {
/**
* Text for the ARIA screen reader.
*/
ariaLabel?: string;
/**
* Text primary text inside the component.
*/
primaryText?: string;
/**
* Text secondary text inside the component.
*/
secondaryText?: string;
/**
* If `true`, the background will be blue.
*/
selected?: boolean;
/**
* If `true`, the background will be fixed in a hover state.
*/
active?: boolean;
/**
* If `true`, the checkbox will be selected.
*/
checked?: boolean;
/**
* If `true`, the component will only show the Icon.
*/
collapsed?: boolean;
/**
* If `true`, the component won't have the tooltip when collapsed.
*/
disableTooltip?: boolean;
/**
* The variant of the component.
*/
variant?: 'icon' | 'avatar' | 'checkbox';
/**
* The vertical size of the component.
*/
size?: 'medium' | 'large';
/**
* The icon on the left.
*/
iconName?: IconName;
/**
* The props of the Avatar variant.
*/
AvatarProps?: AvatarProps;
/**
* The icon on the right.
*/
secondaryIconName?: IconName;
/**
* The right action callback.
*/
onSecondaryClick?: () => void;
/**
* The callback when clicking the component.
*/
onClick?: () => void;
}