Added width props on box component
This commit is contained in:
parent
73ac0ae2d1
commit
bc67d9a445
1 changed files with 2 additions and 1 deletions
|
|
@ -8,13 +8,14 @@ interface Props {
|
||||||
curved?: boolean
|
curved?: boolean
|
||||||
padding?: string
|
padding?: string
|
||||||
background?: string
|
background?: string
|
||||||
|
width?: string
|
||||||
}
|
}
|
||||||
|
|
||||||
export default (props: Props) => {
|
export default (props: Props) => {
|
||||||
const boxClass = createMemo(() => (props.curved ? 'curvedbox' : 'box'))
|
const boxClass = createMemo(() => (props.curved ? 'curvedbox' : 'box'))
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<section class={boxClass()} style={`border: ${props.thickness}px solid ${props.color || 'white'}; padding: ${props.padding || 0}; 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'}; width: ${props.width || 'auto'}`}>
|
||||||
{props.children}
|
{props.children}
|
||||||
</section>
|
</section>
|
||||||
)
|
)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue