- NeuButton
NeuButton is a component which is equivalent to Button component in other libraries.
Props
This component accepts 1 prop:
text
- text which you want as text in buttonhovered
- this prop accepts a boolean valueclicked
- this prop accepts a boolean valuemouseOver
- this prop accepts a functionmouseOut
- this prop accepts a functiononClick
- this prop also accepts a function
import { NeuButton } from 'neumorphic-ui';class Example extends Component {constructor(props){super(props);this.state = {hovered: false,clicked: false}}onClick = () => {this.setState({ hovered:false, clicked: !this.state.clicked }); }mouseOver = () => {!this.state.clicked && this.setState({hovered:true})}mouseOut = () => {this.setState({hovered: false})}render () {return (<NeuButton hovered={this.state.hovered} clicked={this.state.clicked} onClick={this.onClick} mouseOver={this.mouseOver} mouseOut={this.mouseOut} text="Neumorhpic Button" />)}}