Skip to content

Latest commit

 

History

History
33 lines (27 loc) · 1.12 KB

button.md

File metadata and controls

33 lines (27 loc) · 1.12 KB

Button

Properties

Property Type Description
color string, bool Sets whether the button is colored (bool) or sets the color of the button (string).
hidden bool Sets the visibility of a component.
onClick function Callback function when the button is pressed.
push bool Display push animation when pressing the button.
theme string Sets the UI theme that is used by this component and its children elements.
Property value "light", "dark"
type string Sets the type of the button
Property value "button" "submit". Default value "button".

Examples

import React, { Component } from 'react';
import { Button } from 'react-desktop/windows';

export default class extends Component {
  static defaultProps = {
    color: '#cc7f29'
  };

  render() {
    return (
      <Button push color={this.props.color} onClick={() => console.log('Clicked!')}>
        Press me!
      </Button>
    );
  }
}