react-select#FormatOptionLabelMeta TypeScript Examples
The following examples show how to use
react-select#FormatOptionLabelMeta.
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: className-subsection.tsx From utopia with MIT License | 6 votes |
function formatOptionLabel(
{ label, categories }: TailWindOption,
{ context, inputValue }: FormatOptionLabelMeta<TailWindOption>,
) {
return context === 'menu' ? (
<MatchHighlighter text={label} searchString={inputValue} />
) : (
<LabelWithStripes label={label} categories={categories ?? []} />
)
}