({ component }: IProps)
| 8 | } |
| 9 | |
| 10 | const 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 | |
| 30 | export default SelectPreview |
nothing calls this directly
no test coverage detected