1
0
mirror of https://github.com/mattermost/focalboard.git synced 2025-07-06 23:36:34 +02:00
Files
focalboard/src/client/components/button.tsx

27 lines
540 B
TypeScript
Raw Normal View History

2020-10-08 09:21:27 -07:00
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 }