mirror of
https://github.com/CompassConnections/Compass.git
synced 2026-02-01 01:20:57 -05:00
27 lines
633 B
TypeScript
27 lines
633 B
TypeScript
import { PLATFORM_LABELS, SITE_ORDER } from 'common/socials'
|
|
import { SearchableSelect } from './searchable-select'
|
|
import { SocialIcon } from '../user/social'
|
|
|
|
const suggestions = SITE_ORDER.map((platform) => {
|
|
return {
|
|
id: platform,
|
|
label: PLATFORM_LABELS[platform],
|
|
icon: <SocialIcon site={platform} className="text-primary-700 h-4 w-4" />,
|
|
}
|
|
})
|
|
|
|
export function PlatformSelect(props: {
|
|
value: string
|
|
onChange: (value: string) => void
|
|
className?: string
|
|
}) {
|
|
return (
|
|
<SearchableSelect
|
|
{...props}
|
|
suggestions={suggestions}
|
|
placeholder="Platform"
|
|
allowCustom={true}
|
|
/>
|
|
)
|
|
}
|