Skip to content

Commit 7720ab5

Browse files
committed
Charts: Replace __experimentalHStack with Stack in donut story
Migrates the CustomPieLegend example off @wordpress/components' experimental HStack onto the stable Stack from @wordpress/ui. Refs CHARTS-175.
1 parent 43b89bf commit 7720ab5

1 file changed

Lines changed: 3 additions & 5 deletions

File tree

projects/js-packages/charts/src/charts/pie-chart/stories/donut.stories.tsx

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
/* eslint-disable @wordpress/no-unsafe-wp-apis */
2-
import { __experimentalHStack as HStack } from '@wordpress/components';
3-
import { Text } from '@wordpress/ui';
1+
import { Stack, Text } from '@wordpress/ui';
42
import { Fragment } from 'react';
53
import { BaseLegendItem } from '../../../components/legend/types';
64
import {
@@ -267,7 +265,7 @@ const CustomPieLegend = ( {
267265

268266
return (
269267
<Fragment key={ index }>
270-
<HStack direction="row" justify="flex-start" spacing={ 2 }>
268+
<Stack direction="row" justify="flex-start" gap="sm">
271269
<div
272270
style={ {
273271
width: '8px',
@@ -278,7 +276,7 @@ const CustomPieLegend = ( {
278276
} }
279277
/>
280278
<Text variant="body-sm">{ item.label }</Text>
281-
</HStack>
279+
</Stack>
282280
<Text variant="body-sm" style={ { fontWeight: 600, textAlign: 'right' } }>
283281
{ item.formattedValue }
284282
</Text>

0 commit comments

Comments
 (0)