mirror of
https://github.com/mattermost/focalboard.git
synced 2025-05-13 21:37:37 +02:00
27 lines
540 B
TypeScript
27 lines
540 B
TypeScript
|
import React from "react"
|
||
|
|
||
|
type Props = {
|
||
|
onClick?: (e: React.MouseEvent<HTMLDivElement>) => void
|
||
|
style?: React.CSSProperties
|
||
|
backgroundColor?: string
|
||
|
text?: string
|
||
|
title?: string
|
||
|
}
|
||
|
|
||
|
class Button extends React.Component<Props> {
|
||
|
render() {
|
||
|
const style = {...this.props.style, backgroundColor: this.props.backgroundColor}
|
||
|
return (
|
||
|
<div
|
||
|
onClick={this.props.onClick}
|
||
|
className="octo-button"
|
||
|
style={style}
|
||
|
title={this.props.title}>
|
||
|
{this.props.children}
|
||
|
{this.props.text}
|
||
|
</div>)
|
||
|
}
|
||
|
}
|
||
|
|
||
|
export { Button }
|