Files
Compass/web/components/widgets/platform-select.tsx
Martin Braquet ba9b3cfb06 Add pretty formatting (#29)
* 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
2026-02-20 17:32:27 +01:00

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}
/>
)
}