Skip to content

Instantly share code, notes, and snippets.

@joshuacrass
Last active September 18, 2018 08:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save joshuacrass/56816c92fd9498d044952613f7135502 to your computer and use it in GitHub Desktop.
Save joshuacrass/56816c92fd9498d044952613f7135502 to your computer and use it in GitHub Desktop.
react-flow button component
// @flow
import React from 'react';
// 'children' is required and must be a string
type Props = {
children: string,
};
const Button = (props: Props) => {
// destructure the children from props
const { children } = props;
return (
<div>
<button type="button">{children}</button>
</div>
);
};
export default Button;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment