Skip to content

Commit

Permalink
Color Variations: Use Grid rather than VStack (WordPress#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 authored and patil-vipul committed Jun 17, 2024
1 parent 8dbd48f commit 1c4b894
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 1c4b894

Please sign in to comment.