Skip to content

Commit

Permalink
Refactored icon heights to css vars (deephaven#1890)
Browse files Browse the repository at this point in the history
  • Loading branch information
bmingles committed Apr 23, 2024
1 parent 3cf75c1 commit 6f22da6
Show file tree
Hide file tree
Showing 6 changed files with 244 additions and 38 deletions.
24 changes: 0 additions & 24 deletions packages/code-studio/src/styleguide/ListViews.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,6 @@ import { generateNormalizedItems, sampleSectionIdAndClasses } from './utils';
// Generate enough items to require scrolling
const itemsSimple = [...generateNormalizedItems(52)];
const itemsWithIcons = [...generateNormalizedItems(52, { icons: true })];
const itemsWithIconsAndDescriptions = [
...generateNormalizedItems(52, { icons: true, descriptions: true }),
];

function AccountIllustration(): JSX.Element {
return (
Expand Down Expand Up @@ -54,7 +51,6 @@ export function ListViews(): JSX.Element {
);

const [showIcons, setShowIcons] = useState(true);
const [showDescriptions, setShowDescriptions] = useState(true);

const onChange = useCallback((keys: 'all' | Iterable<ItemKey>): void => {
setSelectedKeys(keys);
Expand Down Expand Up @@ -153,12 +149,6 @@ export function ListViews(): JSX.Element {
>
Show Ions
</Checkbox>
<Checkbox
checked={showDescriptions}
onChange={e => setShowDescriptions(e.currentTarget.checked)}
>
Show Descriptions
</Checkbox>
</Flex>

<LabeledFlexColumn label="Controlled">
Expand All @@ -167,7 +157,6 @@ export function ListViews(): JSX.Element {
normalizedItems={itemsSimple}
selectionMode="multiple"
selectedKeys={selectedKeys}
showItemDescriptions={showDescriptions}
showItemIcons={showIcons}
onChange={onChange}
/>
Expand All @@ -179,19 +168,6 @@ export function ListViews(): JSX.Element {
normalizedItems={itemsWithIcons}
selectionMode="multiple"
selectedKeys={selectedKeys}
showItemDescriptions={showDescriptions}
showItemIcons={showIcons}
onChange={onChange}
/>
</LabeledFlexColumn>

<LabeledFlexColumn label="Controlled (with icons and descriptions)">
<ListViewNormalized
aria-label="Controlled (with icons and descriptions)"
normalizedItems={itemsWithIconsAndDescriptions}
selectionMode="multiple"
selectedKeys={selectedKeys}
showItemDescriptions={showDescriptions}
showItemIcons={showIcons}
onChange={onChange}
/>
Expand Down
Loading

0 comments on commit 6f22da6

Please sign in to comment.