From 8958362d07773a67d53fa711007a5c5b6ef2a032 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fe=CC=81lix=20Pe=CC=81ault?= Date: Sun, 28 Nov 2021 23:08:54 +0100 Subject: [PATCH] Add hover on ButtonCircle only when having a clone --- src/components/atoms/ButtonCircle.svelte | 1 + src/style/atoms/_button-circle.scss | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/components/atoms/ButtonCircle.svelte b/src/components/atoms/ButtonCircle.svelte index f4c96ca..8d9d3af 100644 --- a/src/components/atoms/ButtonCircle.svelte +++ b/src/components/atoms/ButtonCircle.svelte @@ -12,6 +12,7 @@ const classes = [ className, ...[color, size].map(variant => variant && `${className}--${variant}`), + clone ? 'has-clone' : null, $$props.class ].join(' ').trim() diff --git a/src/style/atoms/_button-circle.scss b/src/style/atoms/_button-circle.scss index 1cb9b93..2bd9537 100644 --- a/src/style/atoms/_button-circle.scss +++ b/src/style/atoms/_button-circle.scss @@ -40,7 +40,7 @@ ** States */ // Hover - &:not([disabled]):hover { + &.has-clone:not([disabled]):hover { & > * { &:first-child { opacity: 0; @@ -51,6 +51,7 @@ transform: translate3d(-50%, -50%, 0); } } + } // Disabled