stringifyGridDimension(d)).join(' ')
+ : undefined,
+ gridTemplateRows: !isColumn
+ ? rows.map((d) => stringifyGridDimension(d)).join(' ')
+ : undefined,
+ gap: gridData.gap ?? undefined,
+ rowGap: gridData.rowGap ?? undefined,
+ columnGap: gridData.columnGap ?? undefined,
+ padding:
+ `${gridData.padding.top ?? 0}px ` +
+ `${gridData.padding.left ?? 0}px ` +
+ `${gridData.padding.bottom ?? 0}px ` +
+ `${gridData.padding.right ?? 0}px`,
+ }}
+ >
+ {when(
+ isColumn,
+ columns.map((_, index) => {
+ return (
+
0 && hasGap ? `1px solid ${colorTheme.grey65.value}` : undefined,
+ borderRight:
+ index < columns.length - 1
+ ? `1px solid ${colorTheme.grey65.value}`
+ : undefined,
+ }}
+ />
+ )
+ }),
+ )}
+ {unless(
+ isColumn,
+ rows.map((_, index) => {
+ return (
+
0 && hasGap ? `1px solid ${colorTheme.grey65.value}` : undefined,
+ borderBottom:
+ index < rows.length - 1 ? `1px solid ${colorTheme.grey65.value}` : undefined,
+ }}
+ />
+ )
+ }),
+ )}
+
+ {/* The current snapline */}
+
+ {when(
+ showLabel,
+
- {printPin(props.gridTemplate, targetMarker.position, axis)}
-
-
,
- )}
-
+
+ {printPin(props.gridTemplate, targetMarker.position, axis)}
+
+
,
+ )}
+
+
)
},
)
-SnapLine.displayName = 'SnapLine'
+SnapLines.displayName = 'SnapLines'
interface GridRulerProps {
axis: 'row' | 'column'