import { h, type FunctionComponent } from 'preact' import cn from 'classnames' export default function linkButtonFactory({ defaults, icons, styles }) { const LinkButton: FunctionComponent<{ autoHeight?: boolean className?: string color?: string design?: string href?: string fullWidth?: boolean icon?: string iconSize?: string invert?: boolean size?: string tabIndex?: number title?: string }> = ({ autoHeight = defaults?.autoHeight, children, className, color = defaults?.color, design = defaults?.design, href, fullWidth = defaults?.fullWidth, icon = defaults?.icon, iconSize, invert = defaults?.invert, size = defaults?.size, tabIndex, title, }) => ( {icon && } {children && {children}} ) return LinkButton }