import { ButtonHTMLAttributes, ComponentPropsWithoutRef, ElementType } from 'react'; import classnames from 'classnames'; import { Icon } from './Icon'; export interface ButtonProps extends ButtonHTMLAttributes { color?: 'primary' | 'secondary'; size?: 'xs' | 'sm' | 'md'; justify?: 'start' | 'center'; forDropdown?: boolean; as?: T; } export function Button({ className, as, justify = 'center', children, size = 'md', forDropdown, color, ...props }: ButtonProps & Omit, keyof ButtonProps>) { const Component = as || 'button'; return ( {children} {forDropdown && } ); }