mirror of
https://github.com/movie-web/movie-web.git
synced 2024-11-15 12:35:06 +01:00
0c57aa1a73
Co-authored-by: Jip Frijlink <JipFr@users.noreply.github.com> Co-authored-by: James Hawkins <jhawki2005@gmail.com>
26 lines
684 B
TypeScript
26 lines
684 B
TypeScript
import { Icon, Icons } from "@/components/Icon";
|
|
import { ReactNode } from "react";
|
|
|
|
interface Props {
|
|
icon?: Icons;
|
|
onClick?: () => void;
|
|
children?: ReactNode;
|
|
}
|
|
|
|
export function Button(props: Props) {
|
|
return (
|
|
<button
|
|
type="button"
|
|
onClick={props.onClick}
|
|
className="inline-flex items-center justify-center rounded-lg bg-white px-8 py-3 font-bold text-black transition-[transform,background-color] duration-100 hover:bg-gray-200 active:scale-105 md:px-16"
|
|
>
|
|
{props.icon ? (
|
|
<span className="mr-3 hidden md:inline-block">
|
|
<Icon icon={props.icon} />
|
|
</span>
|
|
) : null}
|
|
{props.children}
|
|
</button>
|
|
);
|
|
}
|