1
0
mirror of https://github.com/mattermost/focalboard.git synced 2025-07-03 23:30:29 +02:00

Moving the buttons icon into the button widget

This commit is contained in:
Jesús Espino
2020-10-31 16:00:28 +01:00
parent 97ff09230c
commit e93f95bf62
3 changed files with 5 additions and 10 deletions

View File

@ -54,8 +54,8 @@ class ViewTitle extends React.Component<Props, State> {
const newIcon = BlockIcons.shared.randomIcon() const newIcon = BlockIcons.shared.randomIcon()
mutator.changeIcon(board, newIcon) mutator.changeIcon(board, newIcon)
}} }}
icon={<EmojiIcon/>}
> >
<EmojiIcon/>
<FormattedMessage <FormattedMessage
id='TableComponent.add-icon' id='TableComponent.add-icon'
defaultMessage='Add Icon' defaultMessage='Add Icon'

View File

@ -13,9 +13,6 @@
&:hover { &:hover {
background-color: rgba(var(--main-fg), 0.1); background-color: rgba(var(--main-fg), 0.1);
} }
.octo-hovercontrol {
background: rgb(239, 239, 238);
}
.Icon { .Icon {
width: 14px; width: 14px;

View File

@ -6,22 +6,20 @@ import './button.scss'
type Props = { type Props = {
onClick?: (e: React.MouseEvent<HTMLDivElement>) => void onClick?: (e: React.MouseEvent<HTMLDivElement>) => void
style?: React.CSSProperties
backgroundColor?: string
children?: React.ReactNode children?: React.ReactNode
title?: string title?: string
icon?: React.ReactNode
} }
export default class Button extends React.Component<Props> { export default class Button extends React.Component<Props> {
render() { render() {
const style = {...this.props.style, backgroundColor: this.props.backgroundColor}
return ( return (
<div <div
onClick={this.props.onClick} onClick={this.props.onClick}
className='Button octo-button' className='Button'
style={style}
title={this.props.title} title={this.props.title}
> >
{this.props.icon}
{this.props.children} {this.props.children}
</div>) </div>)
} }