MCPcopy
hub / github.com/premieroctet/openchakra / SelectPreview

Function SelectPreview

src/components/editor/previews/SelectPreview.tsx:10–28  ·  view source on GitHub ↗
({ component }: IProps)

Source from the content-addressed store, hash-verified

8}
9
10const SelectPreview = ({ component }: IProps) => {
11 const {
12 props: { icon, ...props },
13 } = useInteractive(component)
14 const Icon = useMemo(() => {
15 if (!icon) {
16 return null
17 }
18 return iconsList[icon as keyof typeof iconsList]
19 }, [icon])
20
21 return (
22 <Select {...props} icon={Icon ? <Icon path="" /> : undefined}>
23 <option value="option1">Option 1</option>
24 <option value="option2">Option 2</option>
25 <option value="option3">Option 3</option>
26 </Select>
27 )
28}
29
30export default SelectPreview

Callers

nothing calls this directly

Calls 1

useInteractiveFunction · 0.90

Tested by

no test coverage detected