in space-slack-sync/client/src/app/components/select.tsx [25:48]
export default function ChannelSelectField(props: ChannelSelectFieldProps) {
return <>
<div className="channelSelectField">
<AsyncSelect
defaultOptions={props.defaultOptions}
styles={customStyles}
placeholder="Type to filter channels"
loadOptions={utils.debounce((query: string, callback: OptionsCallback) => props.loadOptions(query, callback))}
theme={(selectTheme: Theme) => ({
...selectTheme,
borderRadius: 0,
colors: {
...selectTheme.colors,
primary: theme.cssVars.get('--text-color-20') || selectTheme.colors.primary,
primary50: theme.cssVars.get('--list-item-hover-background-color') || selectTheme.colors.primary50,
},
})}
components={{ Option, ValueContainer }}
onChange={(newValue: unknown) => props.onChange(newValue as ChannelSelectOption)}
value={props.value}
/>
</div>
</>
}