You've already forked focalboard
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:
@ -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'
|
||||||
|
@ -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;
|
||||||
|
@ -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>)
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user