17 lines
416 B
TypeScript
17 lines
416 B
TypeScript
|
import { FunctionComponent, PropsWithChildren } from "react";
|
||
|
import styles from "./Button.module.css";
|
||
|
export interface ButtonProps extends PropsWithChildren {
|
||
|
onClick?: React.MouseEventHandler<HTMLDivElement> | undefined;
|
||
|
}
|
||
|
|
||
|
export const Button: FunctionComponent<ButtonProps> = ({
|
||
|
children,
|
||
|
onClick,
|
||
|
}) => {
|
||
|
return (
|
||
|
<div className={styles.root} onClick={onClick}>
|
||
|
{children}
|
||
|
</div>
|
||
|
);
|
||
|
};
|