import { h, type FunctionComponent, type PointerEventHandler } from 'preact' import cn from 'classnames' export default function buttonFactory({ defaults, icons, styles }) { const Button: FunctionComponent<{ autoHeight?: boolean className?: string color?: string design?: string disabled?: boolean fullWidth?: boolean icon?: string iconSize?: string invert?: boolean onClick?: PointerEventHandler size?: string tabIndex?: number tag?: string title?: string type?: 'button' | 'reset' | 'submit' }> = ({ autoHeight = defaults?.autoHeight, children, className, color = defaults?.color, design = defaults?.design, disabled, fullWidth = defaults?.fullWidth, icon = defaults?.icon, iconSize, invert = defaults?.invert, onClick, size = defaults?.size, tabIndex, title, type, }) => ( ) return Button }