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
|
||||
padding?: string
|
||||
background?: string
|
||||
width?: 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 || 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}
|
||||
</section>
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue