add seperate modules for dark and light theme
This commit is contained in:
1 parent
15ede7821e
commit
a3b63618b4
10 files changed
+119
-47
No files matched your search
@@ -1,5 +1,8 @@
|
||||
import React from "react";
|
||||
import style from "./PageTitle.module.css"
|
||||
import darktheme from "./PageTitleDarkTheme.module.css"
|
||||
import lighttheme from "./PageTitleLightTheme.module.css"
|
||||
import StaticInfos from "../../GlobalInfos";
|
||||
|
||||
class PageTitle extends React.Component {
|
||||
constructor(props) {
|
||||
@@ -10,17 +13,19 @@ class PageTitle extends React.Component {
|
||||
}
|
||||
|
||||
render() {
|
||||
const themeStyle = StaticInfos.isDarkTheme() ? darktheme : lighttheme;
|
||||
return (
|
||||
<div className={style.pageheader}>
|
||||
<span className={style.pageheadertitle}>{this.props.title}</span>
|
||||
<div className={style.pageheader + ' ' + themeStyle.pageheader}>
|
||||
<span className={style.pageheadertitle + ' ' + themeStyle.pageheadertitle}>{this.props.title}</span>
|
||||
<span className={style.pageheadersubtitle}>{this.props.subtitle}</span>
|
||||
<>
|
||||
{this.props.children}
|
||||
</>
|
||||
<hr/>
|
||||
</div>
|
||||
);
|
||||
)
|
||||
;
|
||||
}
|
||||
}
|
||||
|
||||
export default PageTitle;
|
||||
export default PageTitle;
|
||||
@@ -0,0 +1,11 @@
|
||||
.pageheader {
|
||||
background-color: #141520;
|
||||
}
|
||||
|
||||
.pageheadertitle {
|
||||
color:white;
|
||||
}
|
||||
|
||||
.pageheadersubtitle {
|
||||
color:white;
|
||||
}
|
||||
Whitespace-only changes.
Reference in new issue
Block a user