({
top,
left,
width,
height
}: Position)
| 54 | * @returns CSS style object |
| 55 | */ |
| 56 | export function setTopLeft({ |
| 57 | top, |
| 58 | left, |
| 59 | width, |
| 60 | height |
| 61 | }: Position): Record<string, string> { |
| 62 | return { |
| 63 | top: `${top}px`, |
| 64 | left: `${left}px`, |
| 65 | width: `${width}px`, |
| 66 | height: `${height}px`, |
| 67 | position: "absolute" |
| 68 | }; |
| 69 | } |
| 70 | |
| 71 | /** |
| 72 | * Convert a number to a percentage string. |
no outgoing calls
no test coverage detected
searching dependent graphs…