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

43 lines
1.1 KiB
JavaScript
Raw Normal View History

2020-10-25 18:48:23 +00:00
import React from 'react';
import style from './SideBar.module.css';
2020-12-17 20:53:22 +00:00
import GlobalInfos from '../../utils/GlobalInfos';
2020-06-02 22:52:28 +02:00
2020-08-12 17:50:25 +00:00
/**
* component for sidebar-info
*/
2020-06-02 22:52:28 +02:00
class SideBar extends React.Component {
render() {
const themeStyle = GlobalInfos.getThemeStyle();
2020-08-12 17:50:25 +00:00
return (<div className={style.sideinfo + ' ' + themeStyle.secbackground}>
2020-06-02 22:52:28 +02:00
{this.props.children}
</div>);
}
}
2020-08-12 17:50:25 +00:00
/**
* The title of the sidebar
*/
export class SideBarTitle extends React.Component {
render() {
const themeStyle = GlobalInfos.getThemeStyle();
return (
2020-08-12 17:50:25 +00:00
<div className={style.sidebartitle + ' ' + themeStyle.subtextcolor}>{this.props.children}</div>
);
}
}
2020-08-12 17:50:25 +00:00
/**
* An item of the sidebar
*/
export class SideBarItem extends React.Component {
render() {
const themeStyle = GlobalInfos.getThemeStyle();
return (
2020-10-09 14:00:51 +00:00
<div
className={style.sidebarinfo + ' ' + themeStyle.thirdbackground + ' ' + themeStyle.lighttextcolor}>{this.props.children}</div>
);
}
}
2020-06-02 22:52:28 +02:00
export default SideBar;