Fixed padding props
This commit is contained in:
parent
7af0425b0c
commit
458a87d546
2 changed files with 4 additions and 3 deletions
|
|
@ -6,7 +6,7 @@ interface Props {
|
|||
color?: string
|
||||
children: JSXElement
|
||||
curved?: boolean
|
||||
padding?: number
|
||||
padding?: string
|
||||
background?: string
|
||||
}
|
||||
|
||||
|
|
@ -14,7 +14,7 @@ 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; background-color: ${props.background || 'none'}`}>
|
||||
<section class={boxClass()} style={`border: ${props.thickness}px solid ${props.color || 'white'}; padding: ${props.padding || 0}; background-color: ${props.background || 'none'}`}>
|
||||
{props.children}
|
||||
</section>
|
||||
)
|
||||
|
|
|
|||
|
|
@ -5,12 +5,13 @@ interface Props {
|
|||
children: JSXElement
|
||||
content?: 'top' | 'center' | 'bottom' | 'split' | 'spaced'
|
||||
gap?: number
|
||||
padding?: string
|
||||
}
|
||||
|
||||
export default (props: Props) => {
|
||||
return (
|
||||
<>
|
||||
<section class={`column-${props.content || 'center'}`} style={`gap: ${props.gap}rem`}>
|
||||
<section class={`column-${props.content || 'center'}`} style={`gap: ${props.gap}rem; padding: ${props.padding || 0}`}>
|
||||
{props.children}
|
||||
</section>
|
||||
</>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue