refactor: improve news and email handling, style, folder structure (#16)

This commit is contained in:
Riccardo Senica
2024-06-04 18:04:54 +08:00
committed by GitHub
parent bc5e0cc195
commit acc10bf5fd
62 changed files with 1737 additions and 1553 deletions

19
components/Button.tsx Normal file
View File

@@ -0,0 +1,19 @@
import { Slot } from '@radix-ui/react-slot';
import { cn } from '@utils/ui';
import * as React from 'react';
export type ButtonProps = {
asChild?: boolean;
} & React.ButtonHTMLAttributes<HTMLButtonElement>;
const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(
({ asChild = false, ...props }, ref) => {
const Comp = asChild ? Slot : 'button';
return (
<Comp className={cn('btn-grad', 'btn-grad-hover')} ref={ref} {...props} />
);
}
);
Button.displayName = 'Button';
export { Button };