File tree Expand file tree Collapse file tree 3 files changed +9
-5
lines changed
packages/theming/demo/~patterns Expand file tree Collapse file tree 3 files changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ import { GetColorV8Story } from './stories/GetColorV8Story';
88
99The following stories test the performance of the ` getColor ` and ` getColorV8 `
1010functions. 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 `
1212object comparison to optimize performance.
1313
1414## ` getColor ` test
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ import { getColor } from '@zendeskgarden/react-theming';
1212import { Button } from '@zendeskgarden/react-buttons' ;
1313import { Grid } from '@zendeskgarden/react-grid' ;
1414import { Dots } from '@zendeskgarden/react-loaders' ;
15- import { Code , Paragraph } from '@zendeskgarden/react-typography' ;
15+ import { Code , Paragraph , Span } from '@zendeskgarden/react-typography' ;
1616
1717const 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 && (
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ import { getColorV8 } from '@zendeskgarden/react-theming';
1212import { Button } from '@zendeskgarden/react-buttons' ;
1313import { Grid } from '@zendeskgarden/react-grid' ;
1414import { Dots } from '@zendeskgarden/react-loaders' ;
15- import { Code , Paragraph } from '@zendeskgarden/react-typography' ;
15+ import { Code , Paragraph , Span } from '@zendeskgarden/react-typography' ;
1616import PALETTE_V8 from '../../../src/elements/palette/v8' ;
1717
1818const 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 && (
You can’t perform that action at this time.
0 commit comments