generated from lucien/actix-react-template
New button component
This commit is contained in:
parent
583b14ce0d
commit
ebf4620640
2 changed files with 41 additions and 0 deletions
12
front/src/components/Button.tsx
Normal file
12
front/src/components/Button.tsx
Normal file
|
@ -0,0 +1,12 @@
|
|||
import { ReactNode, MouseEventHandler } from 'react';
|
||||
|
||||
interface ButtonProps {
|
||||
onClick: MouseEventHandler<HTMLButtonElement>;
|
||||
children: ReactNode;
|
||||
}
|
||||
|
||||
export default function Button({ onClick, children }: ButtonProps) {
|
||||
return (
|
||||
<button onClick={onClick} className="ni-button" role="button">{children}</button>
|
||||
)
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue