Skip to content

Commit

Permalink
Fixed large scale in styleguide (deephaven#1890)
Browse files Browse the repository at this point in the history
  • Loading branch information
bmingles committed Apr 29, 2024
1 parent b184a27 commit 707c733
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
9 changes: 7 additions & 2 deletions packages/code-studio/src/styleguide/ListViews.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,10 @@ interface LabeledProps extends StyleProps {

const LABELED_FLEX_CONTAINER_HEIGHTS = {
gap: 10,
label: 21,
label: {
medium: 21,
large: 25.5,
},
};

function LabeledFlexContainer({
Expand Down Expand Up @@ -71,8 +74,10 @@ export function ListViews(): JSX.Element {
);

const [density, setDensity] = useState<ListViewProps['density']>('compact');

// Calculate the height of the single child example
const singleChildExampleHeight =
LABELED_FLEX_CONTAINER_HEIGHTS.label +
LABELED_FLEX_CONTAINER_HEIGHTS.label[scale] +
LABELED_FLEX_CONTAINER_HEIGHTS.gap +
2 + // listview border
LIST_VIEW_ROW_HEIGHTS[density ?? 'compact'][scale];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@
}

.dh-list-view-wrapper-scale-large {
--dh-list-view-item-icon-compact: 30px;
--dh-list-view-item-icon-regular: 32px;
--dh-list-view-item-icon-spacious: 40px;
--dh-list-view-item-icon-compact: 20px;
--dh-list-view-item-icon-regular: 24px;
--dh-list-view-item-icon-spacious: 30px;
}

.dh-list-view-wrapper-density-compact {
Expand Down

0 comments on commit 707c733

Please sign in to comment.