OpenMediaCenter/src/elements/SideBar/SideBar.js

34 lines
993 B
JavaScript
Raw Normal View History

import React from "react";
import style from "./SideBar.module.css"
2020-08-03 18:38:22 +00:00
import StaticInfos from "../../GlobalInfos";
import darktheme from "../../AppDarkTheme.module.css";
import lighttheme from "../../AppLightTheme.module.css";
class SideBar extends React.Component {
render() {
2020-08-03 18:38:22 +00:00
const themeStyle = StaticInfos.isDarkTheme() ? darktheme : lighttheme;
return (<div className={style.sideinfo + ' '+ themeStyle.secbackground}>
{this.props.children}
</div>);
}
}
export class SideBarTitle extends React.Component {
render() {
2020-08-03 18:38:22 +00:00
const themeStyle = StaticInfos.isDarkTheme() ? darktheme : lighttheme;
return (
2020-08-03 18:38:22 +00:00
<div className={style.sidebartitle + ' '+ themeStyle.subtextcolor}>{this.props.children}</div>
);
}
}
export class SideBarItem extends React.Component {
render() {
return (
<div className={style.sidebarinfo}>{this.props.children}</div>
);
}
}
export default SideBar;