2019-05-30 07:06:17 +02:00
|
|
|
import {React} from "modules";
|
2019-05-28 23:27:25 +02:00
|
|
|
|
2022-01-23 10:23:25 +01:00
|
|
|
const className = "bd-settings-title";
|
|
|
|
const className2 = "bd-settings-title bd-settings-group-title";
|
2019-06-04 06:18:15 +02:00
|
|
|
|
|
|
|
export default class SettingsTitle extends React.Component {
|
2019-05-28 20:19:48 +02:00
|
|
|
render() {
|
2019-06-06 06:28:43 +02:00
|
|
|
const baseClass = this.props.isGroup ? className2 : className;
|
|
|
|
const titleClass = this.props.className ? `${baseClass} ${this.props.className}` : baseClass;
|
2019-06-04 21:17:23 +02:00
|
|
|
return <h2 className={titleClass} onClick={() => {this.props.onClick && this.props.onClick();}}>
|
|
|
|
{this.props.text}
|
2019-06-21 06:32:59 +02:00
|
|
|
{this.props.button && <button className="bd-button bd-button-title" onClick={this.props.button.onClick}>{this.props.button.title}</button>}
|
2019-06-10 00:37:46 +02:00
|
|
|
{this.props.otherChildren}
|
2019-06-04 21:17:23 +02:00
|
|
|
</h2>;
|
2019-05-28 20:19:48 +02:00
|
|
|
}
|
|
|
|
}
|