Skip to content

Commit

Permalink
Color Variations: Use Grid rather than VStack (#62445)
Browse files Browse the repository at this point in the history
Co-authored-by: richtabor <richtabor@git.wordpress.org>
Co-authored-by: jasmussen <joen@git.wordpress.org>
Co-authored-by: bgardner <bgardner@git.wordpress.org>
  • Loading branch information
4 people committed Jun 10, 2024
1 parent b8fca79 commit 5a1031b
Showing 1 changed file with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
/**
* WordPress dependencies
*/
import { __experimentalVStack as VStack } from '@wordpress/components';
import {
__experimentalVStack as VStack,
__experimentalGrid as Grid,
} from '@wordpress/components';

/**
* Internal dependencies
Expand All @@ -22,13 +25,13 @@ export default function ColorVariations( { title, gap = 2 } ) {
return (
<VStack spacing={ 3 }>
{ title && <Subtitle level={ 3 }>{ title }</Subtitle> }
<VStack spacing={ gap }>
<Grid spacing={ gap }>
{ colorVariations.map( ( variation, index ) => (
<Variation key={ index } variation={ variation } isPill>
{ () => <StylesPreviewColors /> }
</Variation>
) ) }
</VStack>
</Grid>
</VStack>
);
}

0 comments on commit 5a1031b

Please sign in to comment.