Skip to content

Instantly share code, notes, and snippets.

@kevinSuttle
Created July 27, 2016 14:09
Show Gist options
  • Save kevinSuttle/4a4a5e5f7efc063249bb6581466bd1b0 to your computer and use it in GitHub Desktop.
Save kevinSuttle/4a4a5e5f7efc063249bb6581466bd1b0 to your computer and use it in GitHub Desktop.
Props Composition?
/* @flow */
type ButtonProps = {
onClick: () => void,
type: 'button' | 'reset' | 'submit',
design: 'primary' | 'secondary' | 'page' | 'tooltipInfo' | 'tooltipDocs',
onFocus: () => void,
onmouseover: () => void,
onmouseout: () => void,
className:string,
children: Array<HTMLElement>,
}
type IconProps = {
glyph:string,
className?: string,
title?: string,
width?: string,
height?: string,
};
const IconButtonProps = Object.assign(ButtonProps, IconProps)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment