Added padding component
This commit is contained in:
parent
92eeebaf87
commit
cc5a7bfd35
1 changed files with 13 additions and 0 deletions
13
fwt/components/Padding.tsx
Normal file
13
fwt/components/Padding.tsx
Normal file
|
|
@ -0,0 +1,13 @@
|
||||||
|
import { type JSXElement } from 'solid-js'
|
||||||
|
|
||||||
|
interface Props {
|
||||||
|
left: number
|
||||||
|
right: number
|
||||||
|
top?: number
|
||||||
|
bottom?: number
|
||||||
|
children: JSXElement
|
||||||
|
}
|
||||||
|
|
||||||
|
export default (props: Props) => {
|
||||||
|
return <div style={{ padding: `${props.top || 0}rem ${props.right}rem ${props.bottom || 0}rem ${props.left}rem` }}>{props.children}</div>
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue