Raw
1 import React from "react"
2
3 type SpaceProps = {
4 top?: number
5 bottom?: number
6 left?: number
7 right?: number
8 }
9
10 const Space = ({ top = 0, bottom = 0, left = 0, right = 0 }: SpaceProps) => {
11 return (
12 <div
13 className="w-full"
14 style={{
15 height: `1px`,
16 marginTop: `${top ? top - 1 : top}px`,
17 marginBottom: `${bottom ? bottom - 1 : bottom}px`,
18 marginLeft: `${left}px`,
19 marginRight: `${right}px`,
20 }}
21 data-testid="space"
22 ></div>
23 )
24 }
25
26 export default Space