Created
July 27, 2016 14:09
-
-
Save kevinSuttle/4a4a5e5f7efc063249bb6581466bd1b0 to your computer and use it in GitHub Desktop.
Props Composition?
This file contains hidden or 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
/* @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