Skip to content

Commit 19ba4c6

Browse files
authored
Merge pull request #32 from ChicoState/component-grid
Disable widgets in edit mode
2 parents a7391f4 + c7e8753 commit 19ba4c6

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

src/Grid.css

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,10 @@
9292
/*opacity var(--transition-time);*/
9393
}
9494

95+
.grid-item.editing > div * {
96+
pointer-events: none;
97+
}
98+
9599
.grid-item.resizing,
96100
.grid-item.dragging {
97101
box-sizing: border-box;

src/Grid.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,7 @@ export function GridItem({
156156
styles.gridItem,
157157
dragging ? styles.dragging : "",
158158
resizing ? styles.resizing : "",
159+
ctx.editing ? styles.editing : "",
159160
!isValid ? styles.invalid : "",
160161
].join(" ")}
161162
style={{

0 commit comments

Comments
 (0)