import Icon from '@/web/components/Icon' import { cx } from '@emotion/css' import { motion } from 'framer-motion' export function Switch({ enabled, onChange, }: { enabled: boolean onChange: (enabled: boolean) => void }) { return ( onChange(!enabled)} > ) } export function Select({ options, value, onChange, }: { options: { name: string; value: T }[] value: T onChange: (value: T) => void }) { return ( onChange(e.target.value as T)} value={value} className='h-full w-full appearance-none bg-transparent py-1 pl-3 pr-7 focus:outline-none' > {options.map(option => ( {option.name} ))} ) } export function Input({ value, onChange, type = 'text', }: { value: string onChange: (value: string) => void type?: 'text' | 'password' | 'number' }) { return ( Host onChange(e.target.value)} {...{ type, value }} /> ) } export function Button({ disalbed: disabled, children, onClick, }: { disalbed?: boolean children: React.ReactNode onClick: () => void }) { return ( {children} ) } export function BlockTitle({ children }: { children: React.ReactNode }) { return {children} } export function BlockDescription({ children }: { children: React.ReactNode }) { return {children} } export function Option({ children }: { children: React.ReactNode }) { return {children} } export function OptionText({ children }: { children: React.ReactNode }) { return ( {children} ) }