articles/@dasig/components/Padding.tsx
2026-03-12 19:27:56 +08:00

14 lines
377 B
TypeScript

import type { JSXElement } from 'solid-js'
import '../styles/Padding.sass'
interface Props {
left: number
right: number
top?: number
bottom?: number
children: JSXElement
}
export default (props: Props) => {
return <div class='padding' style={{ padding: `${props.top || 0}rem ${props.right}rem ${props.bottom || 0}rem ${props.left}rem` }}>{props.children}</div>
}