MCPcopy
hub / github.com/react-grid-layout/react-grid-layout / setTopLeft

Function setTopLeft

src/core/position.ts:56–69  ·  view source on GitHub ↗
({
  top,
  left,
  width,
  height
}: Position)

Source from the content-addressed store, hash-verified

54 * @returns CSS style object
55 */
56export 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.

Callers 3

GridItemFunction · 0.85
calcStyleFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…