Files
medusa-store/www/apps/api-reference/components/Space/index.tsx
Shahed Nasser 4d632e7a5d docs: added tests for components in api-reference project (#14428)
* add tests (WIP)

* added test for h2

* finished adding tests

* fixes

* fixes

* fixes
2026-01-05 10:56:56 +02:00

27 lines
526 B
TypeScript

import React from "react"
type SpaceProps = {
top?: number
bottom?: number
left?: number
right?: number
}
const Space = ({ top = 0, bottom = 0, left = 0, right = 0 }: SpaceProps) => {
return (
<div
className="w-full"
style={{
height: `1px`,
marginTop: `${top ? top - 1 : top}px`,
marginBottom: `${bottom ? bottom - 1 : bottom}px`,
marginLeft: `${left}px`,
marginRight: `${right}px`,
}}
data-testid="space"
></div>
)
}
export default Space