Created Layout & Responsive Header Component

This commit is contained in:
aftabrehan
2024-02-01 20:28:42 +05:00
parent 9ac97c7f9a
commit bc7cad7e3b
21 changed files with 413 additions and 30 deletions

30
components/button.tsx Normal file
View File

@@ -0,0 +1,30 @@
import clsx from 'clsx'
interface buttonProps {
label: string
onClick?: () => void
variant?: 'primary' | 'secondary'
}
export const Button = ({
label,
onClick,
variant = 'primary',
}: buttonProps) => {
const cls = {
primary: 'bg-primary text-white',
secondary: 'text-black hover:bg-zinc-100',
}[variant]
return (
<button
onClick={onClick}
className={clsx(
'h-12 px-5 flex items-center justify-center text-base font-medium text-nowrap rounded-full hover:opacity-75 transition-all duration-200',
cls
)}
>
{label}
</button>
)
}