mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-03-18 15:33:52 +01:00
Start of themes
This commit is contained in:
@@ -5,18 +5,22 @@ import type { ButtonProps } from './Button';
|
||||
import { Button } from './Button';
|
||||
import classnames from 'classnames';
|
||||
|
||||
type Props = Omit<IconProps, 'size'> & ButtonProps<typeof Button>;
|
||||
type Props = Omit<IconProps, 'size'> &
|
||||
ButtonProps<typeof Button> & {
|
||||
iconClassName?: string;
|
||||
};
|
||||
|
||||
export const IconButton = forwardRef<HTMLButtonElement, Props>(function IconButton(
|
||||
{ icon, spin, ...props }: Props,
|
||||
{ icon, spin, className, iconClassName, ...props }: Props,
|
||||
ref,
|
||||
) {
|
||||
return (
|
||||
<Button ref={ref} className="group" {...props}>
|
||||
<Button ref={ref} className={classnames(className, 'group')} {...props}>
|
||||
<Icon
|
||||
icon={icon}
|
||||
spin={spin}
|
||||
className={classnames(
|
||||
iconClassName,
|
||||
'text-gray-700 group-hover:text-gray-900',
|
||||
props.disabled && 'opacity-70',
|
||||
)}
|
||||
|
||||
Reference in New Issue
Block a user