Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 0 additions & 7 deletions dotcom-rendering/src/components/ProductCardButtons.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,8 @@ const getLabel = (cta: ProductCta): string => {

export const ProductCardButtons = ({
productCtas,
dataComponent,
}: {
productCtas: ProductCta[];
dataComponent?: string;
}) => (
<>
{productCtas.map((productCta, index) => {
Expand All @@ -24,11 +22,6 @@ export const ProductCardButtons = ({
minimisePadding={true}
priority={index === 0 ? 'primary' : 'tertiary'}
fullwidth={true}
dataComponent={
dataComponent
? `${dataComponent}-${index + 1}`
: undefined
}
/>
);
})}
Expand Down
9 changes: 4 additions & 5 deletions dotcom-rendering/src/components/ProductCardInline.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,9 @@ export const ProductCardInline = ({

return (
<div
data-component="product-card-inline"
data-component={`product-card-type-inline${
isCardOnly ? '-only' : ''
}`}
css={[
isCardOnly ? productCard : showcaseCard,
shouldShowLeftColCard && !isCardOnly && hideFromWide,
Expand Down Expand Up @@ -212,10 +214,7 @@ export const ProductCardInline = ({
)}
</div>
<div css={buttonWrapper}>
<ProductCardButtons
productCtas={productCtas}
dataComponent={'inline-product-card-button'}
/>
<ProductCardButtons productCtas={productCtas} />
</div>
{hasCustomAttributes && (
<div css={customAttributesContainer}>
Expand Down
5 changes: 1 addition & 4 deletions dotcom-rendering/src/components/ProductCardLeftCol.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -119,10 +119,7 @@ export const ProductCardLeftCol = ({
)}
</div>
<div css={buttonContainer}>
<ProductCardButtons
productCtas={productCtas}
dataComponent={'left-col-product-card-button'}
/>
<ProductCardButtons productCtas={productCtas} />
</div>
{customAttributes.length > 0 && (
<div css={customAttributesContainer}>
Expand Down
6 changes: 3 additions & 3 deletions dotcom-rendering/src/components/ProductLinkButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ export const ProductLinkButton = ({
fullwidth = false,
minimisePadding = false,
priority = 'primary',
dataComponent = 'in-body-product-link-button',
dataComponent,
}: ProductLinkButtonProps) => {
const cssOverrides: SerializedStyles[] = [
heightAutoStyle,
Expand All @@ -74,11 +74,11 @@ export const ProductLinkButton = ({
icon={<SvgArrowRightStraight />}
theme={theme}
data-ignore="global-link-styling"
data-link-name="in body link"
data-component={dataComponent}
data-link-name={`product link button ${priority}`}
data-spacefinder-role="inline"
size={size}
cssOverrides={cssOverrides}
data-component={dataComponent}
>
<span
css={css`
Expand Down
1 change: 1 addition & 0 deletions dotcom-rendering/src/lib/renderElement.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -583,6 +583,7 @@ export const renderElement = ({
<ProductLinkButton
label={element.label}
url={element.url}
dataComponent={'in-body-product-link-button'}
/>
)}
</>
Expand Down
Loading