Add generic button component
This commit is contained in:
parent
ca6fd65f96
commit
1293d40894
2 changed files with 19 additions and 0 deletions
15
components/ui/Button.tsx
Normal file
15
components/ui/Button.tsx
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
export default function Button({
|
||||
title,
|
||||
mode = "LIGHT",
|
||||
}: {
|
||||
title: string;
|
||||
mode?: "DARK" | "LIGHT";
|
||||
}) {
|
||||
return (
|
||||
<button
|
||||
className={`${mode == "LIGHT" ? "bg-slate-400 dark:bg-slate-800 hover:bg-slate-600" : "bg-gray-400 dark:bg-slate-900"} font-medium py-2 px-4 rounded-lg shadow-md transition duration-200 ease-in-out`}
|
||||
>
|
||||
{title}
|
||||
</button>
|
||||
);
|
||||
}
|
||||
Loading…
Reference in a new issue