Zoom, better sizes, color picker, sidebar footer

This commit is contained in:
Gregory Schier
2023-03-08 19:22:04 -08:00
parent c37cfaf0e4
commit 6c8f4c943a
26 changed files with 424 additions and 239 deletions

View File

@@ -1,22 +1,20 @@
import classnames from 'classnames';
import { forwardRef } from 'react';
import type { IconProps } from './Icon';
import { Icon } from './Icon';
import type { ButtonProps } from './Button';
import { Button } from './Button';
import classnames from 'classnames';
import type { IconProps } from './Icon';
import { Icon } from './Icon';
type Props = Omit<IconProps, 'size'> &
ButtonProps<typeof Button> & {
iconClassName?: string;
};
type Props = IconProps & ButtonProps & { iconClassName?: string; iconSize?: IconProps['size'] };
export const IconButton = forwardRef<HTMLButtonElement, Props>(function IconButton(
{ icon, spin, className, iconClassName, ...props }: Props,
{ icon, spin, className, iconClassName, size, iconSize, ...props }: Props,
ref,
) {
return (
<Button ref={ref} className={classnames(className, 'group')} {...props}>
<Button ref={ref} className={classnames(className, 'group')} size={size} {...props}>
<Icon
size={iconSize}
icon={icon}
spin={spin}
className={classnames(