Skip to content

Commit 9b3e545

Browse files
committed
fix(TooltipModal story): apply correct fg color
1 parent e334bef commit 9b3e545

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

packages/modals/demo/stories/TooltipModalStory.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@
77

88
import React, { useRef } from 'react';
99
import { Story } from '@storybook/react';
10-
import { DEFAULT_THEME, getColorV8 } from '@zendeskgarden/react-theming';
10+
import { useTheme } from 'styled-components';
11+
import { getColor } from '@zendeskgarden/react-theming';
1112
import { Grid } from '@zendeskgarden/react-grid';
1213
import { Button, IconButton } from '@zendeskgarden/react-buttons';
1314
import { Avatar } from '@zendeskgarden/react-avatars';
@@ -45,6 +46,7 @@ export const TooltipModalStory: Story<IArgs> = ({
4546
}) => {
4647
const refs = useRef<(HTMLElement | null | undefined)[]>([]);
4748
const current = refs.current.indexOf(args.referenceElement);
49+
const theme = useTheme();
4850

4951
// Using `aria-label={undefined}` when `hasTitle` is `true` appears to
5052
// void the fallback value in Storybook, resulting in no rendered attribute
@@ -97,9 +99,7 @@ export const TooltipModalStory: Story<IArgs> = ({
9799
}}
98100
onClick={event => handleClick(event.currentTarget)}
99101
>
100-
<Avatar
101-
foregroundColor={getColorV8('foreground', 600 /* default shade */, DEFAULT_THEME)}
102-
>
102+
<Avatar foregroundColor={getColor({ variable: 'foreground.default', theme })}>
103103
<Avatar.Text>{index + 1}</Avatar.Text>
104104
</Avatar>
105105
</IconButton>

0 commit comments

Comments
 (0)