Last active
May 4, 2017 23:43
-
-
Save drawveloper/8a99245f5368fdbd8a32f13bea9243ea to your computer and use it in GitHub Desktop.
How to write a React stateless (functional) component in TypeScript
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 * as React from 'react' | |
const Button = ({children}) => ( | |
<button | |
className="f4 br2 grow no-underline ph5 pv3 dib white bg-dark-pink bn shadow-3 w-100 w-auto-ns b"> | |
{children} | |
</button> | |
) | |
export default Button |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment