From 351e34d74c087678043067053f248fb3357771e5 Mon Sep 17 00:00:00 2001 From: Peter Zimon Date: Fri, 5 Nov 2021 09:19:48 +0100 Subject: [PATCH] Fixed trigger button opacity bug Fixed trigger button bug of not being displayed in Portal settings with certain themes (e.g. Edition) because of setting opacity to 1 with inline CSS. Added condition to only set this property in preview mode. --- ghost/portal/src/components/TriggerButton.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ghost/portal/src/components/TriggerButton.js b/ghost/portal/src/components/TriggerButton.js index 51348b5a05..d579accd40 100644 --- a/ghost/portal/src/components/TriggerButton.js +++ b/ghost/portal/src/components/TriggerButton.js @@ -23,7 +23,8 @@ const ICON_MAPPING = { const Styles = ({brandColor, hasText}) => { const frame = { - ...(!hasText ? {width: '105px'} : {}) + ...(!hasText ? {width: '105px'} : {}), + ...(hasMode(['preview']) ? {opacity: 1} : {}) }; return { frame: { @@ -37,7 +38,6 @@ const Styles = ({brandColor, hasText}) => { animation: '250ms ease 0s 1 normal none running animation-bhegco', transition: 'opacity 0.3s ease 0s', overflow: 'hidden', - opacity: 1, ...frame }, userIcon: {