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