mirror of
https://github.com/mickael-kerjean/filestash.git
synced 2025-11-07 07:07:23 +08:00
25 lines
535 B
JavaScript
25 lines
535 B
JavaScript
import React from "react";
|
|
import PropTypes from "prop-types";
|
|
|
|
import "./button.scss";
|
|
|
|
export class Button extends React.Component {
|
|
constructor(props){
|
|
super(props);
|
|
}
|
|
|
|
render() {
|
|
let props = Object.assign({}, this.props);
|
|
delete props.theme;
|
|
return (
|
|
<button {...props} className={(this.props.theme || "") + " " + (this.props.className || "")}>
|
|
{this.props.children}
|
|
</button>
|
|
);
|
|
}
|
|
}
|
|
|
|
Button.propTypes = {
|
|
theme: PropTypes.string
|
|
};
|