buildo / react-components

Collection of general React components used in buildo projects.
http://react-components.buildo.io/
MIT License
157 stars 21 forks source link

TypeScript: StatefulButton's `onClick` should always return a Promise #1000

Closed FrancescoCioria closed 7 years ago

FrancescoCioria commented 7 years ago

description

StatefulButtonProps should overwrite onClick as:

onClick: (e: React.SyntheticEvent<HTMLDivElement>) => Promise<any>

how to reproduce

specs

{optional: describe a possible fix for this bug, if not obvious}

misc

{optional: other useful info}