This commit is contained in:
Patrick Alvin Alcala 2026-03-18 14:35:03 +08:00
parent fa67b238af
commit e4ca8f8ebd
3 changed files with 22 additions and 10 deletions

View file

@ -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>
);
};