mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 10:12:45 +00:00
27 lines
773 B
TypeScript
27 lines
773 B
TypeScript
import { SFC } from 'inferno';
|
|
import { Box } from './Box';
|
|
|
|
// The cost of flexibility and prettiness.
|
|
export const StyleableSection: SFC<{
|
|
style?;
|
|
titleStyle?;
|
|
textStyle?;
|
|
title?;
|
|
titleSubtext?;
|
|
}> = (props) => {
|
|
return (
|
|
<Box style={props.style}>
|
|
{/* Yes, this box (line above) is missing the "Section" class. This is very intentional, as the layout looks *ugly* with it.*/}
|
|
<Box class="Section__title" style={props.titleStyle}>
|
|
<Box class="Section__titleText" style={props.textStyle}>
|
|
{props.title}
|
|
</Box>
|
|
<div className="Section__buttons">{props.titleSubtext}</div>
|
|
</Box>
|
|
<Box class="Section__rest">
|
|
<Box class="Section__content">{props.children}</Box>
|
|
</Box>
|
|
</Box>
|
|
);
|
|
};
|