31 lines
972 B
JavaScript
Raw Normal View History

import React from "react";
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"
import StaticInfos from "../../GlobalInfos";
class PageTitle extends React.Component {
constructor(props) {
super(props);
this.props = props;
}
render() {
const themeStyle = StaticInfos.isDarkTheme() ? darktheme : lighttheme;
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>
<>
{this.props.children}
</>
2020-07-26 18:17:29 +02:00
<hr className={themeStyle.hrcolor}/>
</div>
2020-07-26 18:17:29 +02:00
);
}
}
export default PageTitle;