Files
OpenMediaCenter/src/elements/PageTitle/PageTitle.js
T

40 lines
1.1 KiB
JavaScript
Raw Normal View History

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-08-12 17:50:25 +00:00
/**
* Component for generating PageTitle with bottom Line
*/
class PageTitle extends React.Component {
render() {
const themeStyle = GlobalInfos.getThemeStyle();
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/>
</div>
2020-07-26 18:17:29 +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() {
const themeStyle = GlobalInfos.getThemeStyle();
2020-08-03 23:31:43 +00:00
return (
<>
<hr className={themeStyle.hrcolor}/>
</>
);
}
}
export default PageTitle;