Skip to content

Commit

Permalink
query styling
Browse files Browse the repository at this point in the history
  • Loading branch information
xannem committed Jun 28, 2023
1 parent e1bf9e8 commit fa4b5c1
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 19 deletions.
10 changes: 8 additions & 2 deletions packages/legend-art/src/panel/PanelLoadingIndicator.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,18 @@ import { clsx } from '../utils/ComponentUtils.js';
export const PanelLoadingIndicator: React.FC<{
isLoading: boolean;
className?: string;
belowModalHeader?: boolean;
}> = (props) => {
const { isLoading, className } = props;
const { isLoading, className, belowModalHeader } = props;
const ref = useRef<HTMLDivElement>(null);

useEffect(() => {
if (ref.current) {
if (belowModalHeader) {
ref.current.parentElement?.classList.add(
'panel-loading-indicator__container__below-modal-header',
);
}
if (isLoading) {
ref.current.parentElement?.classList.add(
'panel-loading-indicator__container',
Expand All @@ -36,7 +42,7 @@ export const PanelLoadingIndicator: React.FC<{
);
}
}
}, [isLoading]);
}, [isLoading, belowModalHeader]);

return (
<div
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@

&__container {
position: relative;

&__below-modal-header {
margin-top: -2rem;
}
}

&--disabled {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,7 @@ export const DataAccessOverview = observer(
>
{isLoading && (
<>
<PanelLoadingIndicator isLoading={true} />
<PanelLoadingIndicator belowModalHeader={true} isLoading={true} />
<PanelDivider />
<PanelDivider />
</>
Expand Down
12 changes: 0 additions & 12 deletions packages/legend-query-builder/style/_data-access-overview.scss
Original file line number Diff line number Diff line change
Expand Up @@ -152,18 +152,6 @@
}
}

.ag-center-cols-viewport {
// stripped background for remaining height of the grid when there are not enough rows
// See https://css-tricks.com/stripes-css/
background: repeating-linear-gradient(
135deg,
var(--color-light-grey-50),
var(--color-light-grey-50) 0.5rem,
var(--color-light-grey-200) 0.5rem,
var(--color-light-grey-200) 1rem
);
}

.ag-header-cell-text {
font-weight: 700;
}
Expand Down
4 changes: 0 additions & 4 deletions packages/legend-query-builder/style/_query-builder.scss
Original file line number Diff line number Diff line change
Expand Up @@ -913,10 +913,6 @@
height: 100%;
padding: 2rem;
}

.panel-loading-indicator__container {
margin-top: -2rem;
}
}

.query-builder__usage-viewer {
Expand Down

0 comments on commit fa4b5c1

Please sign in to comment.