You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

25 lines
624 B
TypeScript

import * as React from 'react';
import { getPalette } from '../App';
export default (props: {text: string, backgroundColor?: string, children?: any}) => {
const style = {
header: {
backgroundColor: (props.backgroundColor !== undefined) ? props.backgroundColor : getPalette('accent1Color'),
color: getPalette('alternateTextColor'),
padding: 15,
},
headerText: {
marginTop: 10,
marginBottom: 10,
},
};
return (
<div style={style.header}>
<h2 style={style.headerText}>{props.text}</h2>
{props.children}
</div>
);
};