Added option to add background
This commit is contained in:
parent
011460a533
commit
ebebbee0c0
1 changed files with 2 additions and 1 deletions
|
|
@ -7,13 +7,14 @@ interface Props {
|
|||
children: JSXElement
|
||||
curved?: boolean
|
||||
padding?: number
|
||||
background?: string
|
||||
}
|
||||
|
||||
export default (props: Props) => {
|
||||
const boxClass = createMemo(() => (props.curved ? 'curvedbox' : 'box'))
|
||||
|
||||
return (
|
||||
<section class={boxClass()} style={`border: ${props.thickness}px solid ${props.color || 'white'}; padding: ${props.padding}rem`}>
|
||||
<section class={boxClass()} style={`border: ${props.thickness}px solid ${props.color || 'white'}; padding: ${props.padding}rem; background-color: ${props.background || 'none'}`}>
|
||||
{props.children}
|
||||
</section>
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue