Last active
June 7, 2022 21:45
-
-
Save Keraito/8cbb2612bd9edfece56108ae5a7f280e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { MouseEventHandler, PropsWithChildren } from "react"; | |
type ComponentProps = { | |
title: string; | |
caption: string; | |
onClick: MouseEventHandler<HTMLButtonElement>; | |
}; | |
const Component = (props: ComponentProps) => ( | |
<div> | |
<h2>{props.title}</h2> | |
<button onClick={props.onClick}>{props.caption}</button> | |
</div> | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment