Skip to content

Commit e6f02ae

Browse files
committed
Improve output format
1 parent db1229f commit e6f02ae

File tree

3 files changed

+9
-5
lines changed

3 files changed

+9
-5
lines changed

packages/theming/demo/~patterns/patterns.stories.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import { GetColorV8Story } from './stories/GetColorV8Story';
88

99
The following stories test the performance of the `getColor` and `getColorV8`
1010
functions. The original implementations used `JSON.stringify` for argument
11-
memmoization. The updated implementations, introduced in v9.0.1, use `WeakMap`
11+
memoization. The updated implementations, introduced in v9.0.1, use `WeakMap`
1212
object comparison to optimize performance.
1313

1414
## `getColor` test

packages/theming/demo/~patterns/stories/GetColorStory.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import { getColor } from '@zendeskgarden/react-theming';
1212
import { Button } from '@zendeskgarden/react-buttons';
1313
import { Grid } from '@zendeskgarden/react-grid';
1414
import { Dots } from '@zendeskgarden/react-loaders';
15-
import { Code, Paragraph } from '@zendeskgarden/react-typography';
15+
import { Code, Paragraph, Span } from '@zendeskgarden/react-typography';
1616

1717
const StyledColor = styled.div`
1818
display: inline-block;
@@ -137,7 +137,9 @@ export const GetColorStory: StoryFn = () => {
137137
<Grid.Row style={{ marginTop: 20 }}>
138138
<Grid.Col>
139139
<StyledColor style={{ backgroundColor }} />
140-
<div style={{ marginTop: 12 }}>{backgroundColor}</div>
140+
<div style={{ marginTop: 12 }}>
141+
<Span isMonospace>{backgroundColor}</Span>
142+
</div>
141143
</Grid.Col>
142144
</Grid.Row>
143145
{perf.milliseconds > 10 && backgroundColor === initialColor && (

packages/theming/demo/~patterns/stories/GetColorV8Story.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import { getColorV8 } from '@zendeskgarden/react-theming';
1212
import { Button } from '@zendeskgarden/react-buttons';
1313
import { Grid } from '@zendeskgarden/react-grid';
1414
import { Dots } from '@zendeskgarden/react-loaders';
15-
import { Code, Paragraph } from '@zendeskgarden/react-typography';
15+
import { Code, Paragraph, Span } from '@zendeskgarden/react-typography';
1616
import PALETTE_V8 from '../../../src/elements/palette/v8';
1717

1818
const StyledColor = styled.div`
@@ -102,7 +102,9 @@ export const GetColorV8Story: StoryFn = () => {
102102
<Grid.Row style={{ marginTop: 20 }}>
103103
<Grid.Col>
104104
<StyledColor style={{ backgroundColor }} />
105-
<div style={{ marginTop: 12 }}>{backgroundColor}</div>
105+
<div style={{ marginTop: 12 }}>
106+
<Span isMonospace>{backgroundColor}</Span>
107+
</div>
106108
</Grid.Col>
107109
</Grid.Row>
108110
{perf.milliseconds > 1 && backgroundColor === initialColor && (

0 commit comments

Comments
 (0)