2020-10-25 18:48:23 +00:00
|
|
|
import React from 'react';
|
|
|
|
import style from './PageTitle.module.css';
|
2020-12-17 20:53:22 +00:00
|
|
|
import GlobalInfos from '../../utils/GlobalInfos';
|
2020-06-19 00:16:18 +02:00
|
|
|
|
2020-08-12 17:50:25 +00:00
|
|
|
/**
|
|
|
|
* Component for generating PageTitle with bottom Line
|
|
|
|
*/
|
2020-06-19 00:16:18 +02:00
|
|
|
class PageTitle extends React.Component {
|
|
|
|
render() {
|
2020-08-05 22:00:55 +02:00
|
|
|
const themeStyle = GlobalInfos.getThemeStyle();
|
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-08-03 23:31:43 +00:00
|
|
|
<Line/>
|
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-08-03 23:31:43 +00:00
|
|
|
/**
|
|
|
|
* class to override default <hr> color and styling
|
|
|
|
* use this for horizontal lines to use the current active theming
|
|
|
|
*/
|
|
|
|
export class Line extends React.Component {
|
|
|
|
render() {
|
2020-08-05 22:00:55 +02:00
|
|
|
const themeStyle = GlobalInfos.getThemeStyle();
|
2020-08-03 23:31:43 +00:00
|
|
|
return (
|
|
|
|
<>
|
|
|
|
<hr className={themeStyle.hrcolor}/>
|
|
|
|
</>
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-07-24 22:47:21 +02:00
|
|
|
export default PageTitle;
|