Moving the buttons icon into the button widget
This commit is contained in:
parent
97ff09230c
commit
e93f95bf62
3 changed files with 5 additions and 10 deletions
|
@ -54,8 +54,8 @@ class ViewTitle extends React.Component<Props, State> {
|
|||
const newIcon = BlockIcons.shared.randomIcon()
|
||||
mutator.changeIcon(board, newIcon)
|
||||
}}
|
||||
icon={<EmojiIcon/>}
|
||||
>
|
||||
<EmojiIcon/>
|
||||
<FormattedMessage
|
||||
id='TableComponent.add-icon'
|
||||
defaultMessage='Add Icon'
|
||||
|
|
|
@ -13,10 +13,7 @@
|
|||
&:hover {
|
||||
background-color: rgba(var(--main-fg), 0.1);
|
||||
}
|
||||
.octo-hovercontrol {
|
||||
background: rgb(239, 239, 238);
|
||||
}
|
||||
|
||||
|
||||
.Icon {
|
||||
width: 14px;
|
||||
height: 14px;
|
||||
|
|
|
@ -6,22 +6,20 @@ import './button.scss'
|
|||
|
||||
type Props = {
|
||||
onClick?: (e: React.MouseEvent<HTMLDivElement>) => void
|
||||
style?: React.CSSProperties
|
||||
backgroundColor?: string
|
||||
children?: React.ReactNode
|
||||
title?: string
|
||||
icon?: React.ReactNode
|
||||
}
|
||||
|
||||
export default class Button extends React.Component<Props> {
|
||||
render() {
|
||||
const style = {...this.props.style, backgroundColor: this.props.backgroundColor}
|
||||
return (
|
||||
<div
|
||||
onClick={this.props.onClick}
|
||||
className='Button octo-button'
|
||||
style={style}
|
||||
className='Button'
|
||||
title={this.props.title}
|
||||
>
|
||||
{this.props.icon}
|
||||
{this.props.children}
|
||||
</div>)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue