15 lines
426 B
TypeScript
15 lines
426 B
TypeScript
import clsx from 'clsx';
|
|
import { h, RenderableProps, JSX } from 'preact';
|
|
|
|
import styles from './icon-button.module.css';
|
|
|
|
type Props = JSX.HTMLAttributes<HTMLButtonElement> & RenderableProps<{ className?: string }>;
|
|
|
|
export function IconButton({ title, children, className, ...props }: Props) {
|
|
return (
|
|
<button className={clsx('icon-button', className, styles.root)} {...props}>
|
|
{children}
|
|
</button>
|
|
);
|
|
}
|