| Property | Type | Description |
|---|---|---|
| color | string | Sets the color of the button. |
| 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". |
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>
);
}
}