Botão

mail@pastecode.io avatar
unknown
javascript
16 days ago
463 B
1
Indexable
Never
class Button extends React.Component {

  render() {
    const { 
      variant,
      content,
      ...others
    } = this.props;
    
    return (
      <button className={variant} {...others}>
        {content}
      </button>
    )
  }
}

React.render(
  <div>
    <Button content="verde" variant="green" />
    <Button content="Azulzin" />
    <Button content="Vermeio" variant="red" />
  </div>,
  document.getElementById('root')
);
Leave a Comment