[Glitch] Fix logo button style

Port ba748a83f2 to glitch-soc

Signed-off-by: Claire <claire.github-309c@sitedethib.com>
This commit is contained in:
Takeshi Umeda
2020-12-27 07:50:34 +09:00
committed by Claire
parent f3aa085af5
commit 7710a6c4b1
6 changed files with 28 additions and 20 deletions

View File

@ -10,17 +10,11 @@ export default class Button extends React.PureComponent {
disabled: PropTypes.bool,
block: PropTypes.bool,
secondary: PropTypes.bool,
size: PropTypes.number,
className: PropTypes.string,
title: PropTypes.string,
style: PropTypes.object,
children: PropTypes.node,
};
static defaultProps = {
size: 36,
};
handleClick = (e) => {
if (!this.props.disabled) {
this.props.onClick(e);
@ -44,12 +38,6 @@ export default class Button extends React.PureComponent {
disabled: this.props.disabled,
onClick: this.handleClick,
ref: this.setRef,
style: {
padding: `0 ${this.props.size / 2.25}px`,
height: `${this.props.size}px`,
lineHeight: `${this.props.size}px`,
...this.props.style,
},
};
if (this.props.title) attrs.title = this.props.title;