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.
This commit is contained in:
Peter Zimon 2021-11-05 09:19:48 +01:00
parent 7aac4fcd4c
commit 351e34d74c

View File

@ -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: {