Closed raptoria closed 7 years ago
this doesn't work, either...
import {Dropdown, Label, DropdownItemProps, LabelProps} from 'semantic-ui-react';
const renderLabel = (item: DropdownItemProps, index: number, label: LabelProps) => ({
color: 'blue',
content: `Customized label - ${label.text}`,
icon: 'check',
} as Label);
ERROR in ./src/components/Menu/ComponentGroupMenu/ComponentGroupMenu.tsx (27,10): error TS2304: Cannot find name 'Label'.
Is it possible to use renderLabel for single selection? I noticed it only works when Dropdown prop is set to 'multiple'.
Is it possible to use renderLabel for single selection?
Nope, Label
works only with multiselect.
According to the example, renderLabel returns an object
My fault, I will make PR that simplifies validation there.
According to the example, renderLabel returns an object, so I'm a little confused as to why the Type definition requires a ReactElement. I can't get the example to compile with TypeScript.
Any ideas?
Version 0.67.2
code: