mirror of
https://github.com/OneUptime/oneuptime.git
synced 2026-04-06 00:32:12 +02:00
feat: simplify styling for BlankCanvas and BlankDashboardUnit components by removing edit mode specific styles
This commit is contained in:
@@ -68,14 +68,7 @@ const BlankCanvasElement: FunctionComponent<ComponentProps> = (
|
||||
gridTemplateColumns: `repeat(${width}, 1fr)`,
|
||||
gap: `${gap}px`,
|
||||
gridAutoRows: `${unitSize}px`,
|
||||
...(props.isEditMode
|
||||
? {
|
||||
backgroundImage:
|
||||
"linear-gradient(to right, rgba(203, 213, 225, 0.3) 1px, transparent 1px), linear-gradient(to bottom, rgba(203, 213, 225, 0.3) 1px, transparent 1px)",
|
||||
backgroundSize: "20px 20px",
|
||||
borderRadius: "16px",
|
||||
}
|
||||
: {}),
|
||||
borderRadius: "16px",
|
||||
}}
|
||||
>
|
||||
{Array.from(Array(height).keys()).map((_: number, index: number) => {
|
||||
|
||||
@@ -21,9 +21,7 @@ const BlankDashboardUnitElement: FunctionComponent<ComponentProps> = (
|
||||
props.onClick();
|
||||
}}
|
||||
style={{
|
||||
border: props.isEditMode
|
||||
? "1px solid rgba(203, 213, 225, 0.4)"
|
||||
: "none",
|
||||
border: "none",
|
||||
borderRadius: "6px",
|
||||
}}
|
||||
/>
|
||||
|
||||
@@ -147,17 +147,7 @@ const DashboardCanvas: FunctionComponent<ComponentProps> = (
|
||||
gap: `${gap}px`,
|
||||
gridAutoRows: `${unitSize}px`,
|
||||
borderRadius: "16px",
|
||||
...(props.isEditMode
|
||||
? {
|
||||
backgroundImage:
|
||||
"radial-gradient(circle, rgba(148, 163, 184, 0.3) 0.8px, transparent 0.8px)",
|
||||
backgroundSize: "20px 20px",
|
||||
padding: "8px",
|
||||
border: "1px dashed rgba(148, 163, 184, 0.25)",
|
||||
}
|
||||
: {
|
||||
padding: "8px",
|
||||
}),
|
||||
padding: "8px",
|
||||
}}
|
||||
>
|
||||
{finalRenderedComponents}
|
||||
|
||||
Reference in New Issue
Block a user