Devendra174's picture
Upload folder using huggingface_hub
1e92f2d verified
raw
history blame contribute delete
671 Bytes
import React from "react";
import PropTypes from "prop-types";
import "./Button.css";
export default class Button extends React.Component {
static propTypes = {
name: PropTypes.string,
orange: PropTypes.bool,
wide: PropTypes.bool,
clickHandler: PropTypes.func,
};
handleClick = () => {
this.props.clickHandler(this.props.name);
};
render() {
const className = [
"component-button",
this.props.orange ? "orange" : "",
this.props.wide ? "wide" : "",
];
return (
<div className={className.join(" ").trim()}>
<button onClick={this.handleClick}>{this.props.name}</button>
</div>
);
}
}