2020-06-19 00:16:18 +02:00
|
|
|
import React from "react";
|
2020-07-08 00:14:08 +02:00
|
|
|
import style from "./PageTitle.module.css"
|
2020-07-26 18:17:29 +02:00
|
|
|
import darktheme from "../../AppDarkTheme.module.css"
|
|
|
|
import lighttheme from "../../AppLightTheme.module.css"
|
2020-07-24 22:47:21 +02:00
|
|
|
import StaticInfos from "../../GlobalInfos";
|
2020-06-19 00:16:18 +02:00
|
|
|
|
|
|
|
class PageTitle extends React.Component {
|
|
|
|
constructor(props) {
|
|
|
|
super(props);
|
|
|
|
|
|
|
|
this.props = props;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
render() {
|
2020-07-24 22:47:21 +02:00
|
|
|
const themeStyle = StaticInfos.isDarkTheme() ? darktheme : lighttheme;
|
2020-06-19 00:16:18 +02:00
|
|
|
return (
|
2020-07-26 18:17:29 +02:00
|
|
|
<div className={style.pageheader + ' ' + themeStyle.backgroundcolor}>
|
|
|
|
<span className={style.pageheadertitle + ' ' + themeStyle.textcolor}>{this.props.title}</span>
|
|
|
|
<span className={style.pageheadersubtitle + ' ' + themeStyle.textcolor}>{this.props.subtitle}</span>
|
2020-06-19 18:21:42 +02:00
|
|
|
<>
|
|
|
|
{this.props.children}
|
|
|
|
</>
|
2020-07-26 18:17:29 +02:00
|
|
|
<hr className={themeStyle.hrcolor}/>
|
2020-06-19 00:16:18 +02:00
|
|
|
</div>
|
2020-07-26 18:17:29 +02:00
|
|
|
);
|
2020-06-19 00:16:18 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-07-24 22:47:21 +02:00
|
|
|
export default PageTitle;
|