import { JSX, ParentComponent, Show, splitProps } from 'solid-js' import { twMerge } from 'tailwind-merge' interface ButtonBaseProps extends JSX.ButtonHTMLAttributes { loading?: boolean disabled?: boolean } interface ButtonWithIconProps extends ButtonBaseProps { icon: JSX.Element children?: JSX.Element } interface ButtonWithoutIconProps extends ButtonBaseProps { icon?: JSX.Element children: JSX.Element } export const Button: ParentComponent< ButtonWithIconProps | ButtonWithoutIconProps > = (props) => { const [local, others] = splitProps(props, ['class', 'loading', 'icon']) return ( ) }