diff --git a/packages/web-react/src/components/Card/Card.tsx b/packages/web-react/src/components/Card/Card.tsx
index 58fa30c203..d45e3018ff 100644
--- a/packages/web-react/src/components/Card/Card.tsx
+++ b/packages/web-react/src/components/Card/Card.tsx
@@ -8,8 +8,8 @@ import { SpiritCardProps } from '../../types';
import { useCardStyleProps } from './useCardStyleProps';
const defaultProps: Partial
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla accumsan, metus ultrices eleifend gravida,
diff --git a/packages/web-react/src/components/Card/stories/CardMedia.stories.tsx b/packages/web-react/src/components/Card/stories/CardMedia.stories.tsx
index be9ed1dfdf..102f431ef8 100644
--- a/packages/web-react/src/components/Card/stories/CardMedia.stories.tsx
+++ b/packages/web-react/src/components/Card/stories/CardMedia.stories.tsx
@@ -24,7 +24,7 @@ const meta: Meta
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla accumsan, metus ultrices eleifend gravida,
diff --git a/packages/web-react/src/components/Card/useCardStyleProps.ts b/packages/web-react/src/components/Card/useCardStyleProps.ts
index 0ff0fcb5be..30f2a7e6f7 100644
--- a/packages/web-react/src/components/Card/useCardStyleProps.ts
+++ b/packages/web-react/src/components/Card/useCardStyleProps.ts
@@ -28,26 +28,29 @@ export interface UseCardStylePropsReturn {
export function useCardStyleProps(props?: UseCardStyleProps): UseCardStylePropsReturn {
const { direction, isBoxed, isExpanded, alignmentX, size, isHeading, hasFilledHeight } = props || {};
const cardClass = useClassNamePrefix('Card');
- const isBoxedClass = `${cardClass}--boxed`;
+ const bodyClass = `${cardClass}Body`;
const directionClass = direction ? `${cardClass}--${kebabCaseToCamelCase(direction)}` : '';
- const mediaSizeClass = size ? `${cardClass}Media--${size}` : '';
- const mediaIsExpandedClass = `${cardClass}Media--expanded`;
- const mediaHasFilledHeightClass = `${cardClass}Media--filledHeight`;
+ const eyebrowClass = `${cardClass}Eyebrow`;
+ const footerClass = `${cardClass}Footer`;
+ const isBoxedClass = `${cardClass}--boxed`;
+ const mediaClass = `${cardClass}Media`;
+ const mediaHasFilledHeightClass = `${mediaClass}--filledHeight`;
+ const mediaIsExpandedClass = `${mediaClass}--expanded`;
+ const mediaSizeClass = size ? `${mediaClass}--${size}` : '';
+ const titleClass = `${cardClass}Title`;
- const rootClasses = classNames(cardClass, directionClass, {
- [isBoxedClass]: isBoxed,
+ const footerClasses = classNames(footerClass, {
+ [useAlignmentClass(footerClass, alignmentX!, 'alignmentX')]: alignmentX,
});
- const mediaClasses = classNames(`${cardClass}Media`, mediaSizeClass, {
+ const mediaClasses = classNames(mediaClass, mediaSizeClass, {
[mediaIsExpandedClass]: isExpanded,
[mediaHasFilledHeightClass]: hasFilledHeight,
});
- const bodyClass = `${cardClass}Body`;
- const eyebrowClass = `${cardClass}Eyebrow`;
- const titleClasses = classNames(`${cardClass}Title`, {
- [`${cardClass}Title--heading`]: isHeading,
+ const rootClasses = classNames(cardClass, directionClass, {
+ [isBoxedClass]: isBoxed,
});
- const footerClasses = classNames(`${cardClass}Footer`, {
- [useAlignmentClass(`${cardClass}Footer`, alignmentX!, 'alignmentX')]: alignmentX,
+ const titleClasses = classNames(titleClass, {
+ [`${titleClass}--heading`]: isHeading,
});
return {
diff --git a/packages/web-react/tests/providerTests/dictionaryPropsTest.tsx b/packages/web-react/tests/providerTests/dictionaryPropsTest.tsx
index b2c795714e..c8be2f458a 100644
--- a/packages/web-react/tests/providerTests/dictionaryPropsTest.tsx
+++ b/packages/web-react/tests/providerTests/dictionaryPropsTest.tsx
@@ -17,6 +17,12 @@ import {
TextColors,
ValidationStatesDictionaryType,
ValidationStates,
+ AlignmentX,
+ AlignmentXExtended,
+ AlignmentXDictionaryType,
+ AlignmentXExtendedDictionaryType,
+ AlignmentYDictionaryType,
+ AlignmentYExtendedDictionaryType,
} from '../../src';
import getElement from '../testUtils/getElement';
@@ -115,3 +121,51 @@ export const validationStatePropsTest = (Component: ComponentType