Updated
This commit is contained in:
parent
fa67b238af
commit
e4ca8f8ebd
3 changed files with 22 additions and 10 deletions
|
|
@ -1,13 +1,23 @@
|
|||
import type { JSXElement } from 'solid-js'
|
||||
import type { JSXElement } from "solid-js";
|
||||
import "../styles/Padding.sass";
|
||||
|
||||
interface Props {
|
||||
left: number
|
||||
right: number
|
||||
top: number
|
||||
bottom: number
|
||||
children: JSXElement
|
||||
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>
|
||||
}
|
||||
return (
|
||||
<div
|
||||
class="dasig-padding"
|
||||
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