mirror of
https://github.com/CompassConnections/Compass.git
synced 2026-03-06 15:59:47 -05:00
* Test * Add pretty formatting * Fix Tests * Fix Tests * Fix Tests * Fix * Add pretty formatting fix * Fix * Test * Fix tests * Clean typeckech * Add prettier check * Fix api tsconfig * Fix api tsconfig * Fix tsconfig * Fix * Fix * Prettier
28 lines
628 B
TypeScript
28 lines
628 B
TypeScript
import {PLATFORM_LABELS, SITE_ORDER} from 'common/socials'
|
|
|
|
import {SocialIcon} from '../user/social'
|
|
import {SearchableSelect} from './searchable-select'
|
|
|
|
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}
|
|
/>
|
|
)
|
|
}
|