Add sidebar

This commit is contained in:
Philipinho
2023-08-29 00:15:48 +01:00
parent 54a748ced7
commit 5b6dbcc5bb
14 changed files with 275 additions and 11 deletions

View File

@ -0,0 +1,18 @@
import { ReactNode } from 'react';
import { Button } from '@/components/ui/button';
interface ButtonIconProps {
icon: ReactNode;
children?: ReactNode;
}
type Props = ButtonIconProps & React.ComponentPropsWithoutRef<typeof Button>;
export default function ButtonWithIcon({ icon, children, ...rest }: Props) {
return (
<Button {...rest} {...(children ? {} : { size: 'icon' })}>
<div className={`${children ? 'mr-[8px]' : ''}`}>{icon}</div>
{children}
</Button>
);
}