UNPKG

generator-oxy-gen

Version:

Yeoman generator for Electron app with React and Rust (WASM).

30 lines (21 loc) 418 B
import React from 'react'; import './button.scss'; const Button = (props) => { const { text, onClick, disabled } = props; function handleClick() { if(!disabled) { onClick(); } } return( <button className={ 'button-container' + (disabled ? ' button-disabled' : '') } onClick={handleClick}> { text } </button> ); } export default Button;