From 8272c9ba94a1cf0ffed2c052fe73997a07bd83ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mat=C3=ADas=20Ventura?= Date: Thu, 24 Mar 2022 13:50:29 +0100 Subject: [PATCH] Add main card animation and disable hover effect. --- .../src/components/global-styles/preview.js | 38 ++++++++++++------- 1 file changed, 24 insertions(+), 14 deletions(-) diff --git a/packages/edit-site/src/components/global-styles/preview.js b/packages/edit-site/src/components/global-styles/preview.js index fba8e9f063f4d..31896801917e6 100644 --- a/packages/edit-site/src/components/global-styles/preview.js +++ b/packages/edit-site/src/components/global-styles/preview.js @@ -106,7 +106,7 @@ const StylesPreview = ( { label, isFocused } ) => { } } initial="start" animate={ - ( isHovered || isFocused ) && ! disableMotion + ( isHovered || isFocused ) && ! disableMotion && label ? 'hover' : 'start' } @@ -126,28 +126,38 @@ const StylesPreview = ( { label, isFocused } ) => { overflow: 'hidden', } } > -
Aa -
+ - { highlightedColors.map( ( { slug, color } ) => ( -
- ) ) } + { highlightedColors.map( + ( { slug, color }, index ) => ( + + ) + ) }