From d5e46cd596e170bc01d20e2f273eec65f4093813 Mon Sep 17 00:00:00 2001 From: David Ichim Date: Mon, 28 Nov 2022 16:57:55 +0200 Subject: [PATCH] fix(buttons): check for styles from item styling instead of block styles - now that the classes are set on the items we need to check from the item model for any theme or inverted option --- src/components/UniversalCard/fragments/CardExtra.jsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/UniversalCard/fragments/CardExtra.jsx b/src/components/UniversalCard/fragments/CardExtra.jsx index b2001827..2314fe48 100644 --- a/src/components/UniversalCard/fragments/CardExtra.jsx +++ b/src/components/UniversalCard/fragments/CardExtra.jsx @@ -16,9 +16,9 @@ const CallToAction = ({ item, itemModel, styles }) => ( as="a" href={getCallToAction(item, itemModel.callToAction)} className={ - styles?.theme - ? styles.inverted - ? styles.theme + ' inverted' + itemModel?.styles['theme:noprefix'] + ? itemModel?.styles['inverted:bool'] + ? itemModel?.styles['theme:noprefix'] + ' inverted' : 'inverted' : 'tertiary inverted' }