Skip to content

Instantly share code, notes, and snippets.

@renatorib
Created March 10, 2017 04:16
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 renatorib/90433213117128914b4f93d894bb371e to your computer and use it in GitHub Desktop.
Save renatorib/90433213117128914b4f93d894bb371e to your computer and use it in GitHub Desktop.
Not composable component
import React from 'react';
type Props = {
isPrimary?: boolean,
isSecondary?: boolean,
isHeaderButton?: boolean,
children: string,
};
const Button = (props: Props) => {
/* Button markup logic */
};
export default Button;
/*
<Button isPrimary>Primary</Button>
<Button isSecondary>Secondary</Button>
<Button isHeaderButton>Header Button</Button>
*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment