Because this library is being currently built for Electron and NW.js, the examples and demos on this site will only work properly in Chrome.
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>
);
}
}