Skip to content

Instantly share code, notes, and snippets.

@viniciusdacal
Last active March 28, 2017 20:54
Show Gist options
  • Select an option

  • Save viniciusdacal/f1933f0453f8af97095ad9e0993995cc to your computer and use it in GitHub Desktop.

Select an option

Save viniciusdacal/f1933f0453f8af97095ad9e0993995cc to your computer and use it in GitHub Desktop.
import React from 'react';
import ReactDom from 'react-dom';
function Button({ children, onClick, type = 'button' }) {
return (
<button type={type} className='btn' onClick={onClick} >
{children}
</button>
);
}
ReactDOM.render(
<Button onClick={() => console.log('You just clicked')} >
Example
</Button>,
document.getElementById('root')
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment