Skip to content

Commit a8fd7c8

Browse files
committed
Clean up demo
1 parent 683bef8 commit a8fd7c8

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

packages/theming/demo/stories/PaletteStory.tsx

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@
77

88
import React, { FC } from 'react';
99
import { StoryFn } from '@storybook/react';
10-
import styled, { useTheme } from 'styled-components';
10+
import styled from 'styled-components';
1111
import { readableColor } from 'polished';
12-
import { IGardenTheme, getColor, mediaQuery } from '@zendeskgarden/react-theming';
12+
import { IGardenTheme, PALETTE, getColor, mediaQuery } from '@zendeskgarden/react-theming';
1313
import { Grid } from '@zendeskgarden/react-grid';
1414

1515
const StyledColorHex = styled.figcaption`
@@ -70,14 +70,13 @@ const StyledList = styled.ul`
7070
`;
7171

7272
const Hue: FC<{ hue: string }> = ({ hue }) => {
73-
const theme = useTheme();
74-
const colors = theme.palette[hue];
73+
const colors = (PALETTE as any)[hue];
7574

7675
return (
7776
<StyledList>
7877
{Object.keys(colors).map(shade => {
7978
const color = colors[shade as any];
80-
const title = hue === 'product' ? shade : `${hue}-${shade}`;
79+
const title = `${hue}-${shade}`;
8180

8281
return (
8382
<li key={shade}>
@@ -123,7 +122,7 @@ export const PaletteStory: StoryFn<IArgs> = ({ palette }) => {
123122
<Grid.Col sm>
124123
<Hue hue={hue1} />
125124
</Grid.Col>
126-
{hue1 !== 'product' && <StyledCol sm>{hue2 && <Hue hue={hue2} />}</StyledCol>}
125+
<StyledCol sm>{hue2 && <Hue hue={hue2} />}</StyledCol>
127126
</StyledRow>
128127
);
129128
})}

0 commit comments

Comments
 (0)