mirror of
https://github.com/mattermost/focalboard.git
synced 2025-05-13 21:37:37 +02:00
27 lines
567 B
TypeScript
27 lines
567 B
TypeScript
import React from "react"
|
|
|
|
import './button.scss'
|
|
|
|
type Props = {
|
|
onClick?: (e: React.MouseEvent<HTMLDivElement>) => void
|
|
style?: React.CSSProperties
|
|
backgroundColor?: string
|
|
text?: string
|
|
title?: string
|
|
}
|
|
|
|
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}
|
|
title={this.props.title}>
|
|
{this.props.children}
|
|
{this.props.text}
|
|
</div>)
|
|
}
|
|
}
|