1
0
Fork 0
mirror of https://github.com/sussy-code/smov.git synced 2024-12-25 15:27:40 +01:00
smov/src/components/Button.tsx

28 lines
559 B
TypeScript
Raw Normal View History

import { Icon, Icons } from "@/components/Icon";
import { ReactNode } from "react";
interface Props {
icon?: Icons;
onClick?: () => void;
children?: ReactNode;
}
// TODO style button
// TODO transition modal
export function Button(props: Props) {
return (
<button
type="button"
onClick={props.onClick}
className="inline-flex items-center justify-center"
>
{props.icon ? (
<span className="mr-3">
<Icon icon={props.icon} />
</span>
) : null}
{props.children}
</button>
);
}