@material-ui/core#ChipProps TypeScript Examples
The following examples show how to use
@material-ui/core#ChipProps.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: FormattedChip.tsx From firetable with Apache License 2.0 | 6 votes |
// TODO: Create a more generalised solution for this
export default function FormattedChip(props: ChipProps) {
const classes = useStyles();
const label =
typeof props.label === "string" ? props.label.toLowerCase() : "";
if (VARIANTS.includes(label)) {
return (
<Chip
size="small"
{...props}
className={clsx(props.className, classes[label])}
/>
);
}
return <Chip size="small" {...props} />;
}