Added react-router

This commit is contained in:
Gregory Schier
2023-02-25 18:04:14 -08:00
parent e4a257b807
commit 2cf7ced1f2
12 changed files with 180 additions and 67 deletions

View File

@@ -1,16 +1,12 @@
import { forwardRef } from 'react';
import { Icon, IconProps } from './Icon';
import { Button, ButtonProps } from './Button';
type Props = Omit<IconProps, 'size'> & ButtonProps;
type Props = Omit<IconProps, 'size'> & ButtonProps<typeof Button>;
export const IconButton = forwardRef<HTMLButtonElement, Props>(function IconButton(
{ icon, spin, ...props }: Props,
ref,
) {
export function IconButton({ icon, spin, ...props }: Props) {
return (
<Button ref={ref} className="group" {...props}>
<Button className="group" {...props}>
<Icon icon={icon} spin={spin} className="text-gray-700 group-hover:text-gray-900" />
</Button>
);
});
}