Skip to content

Commit

Permalink
pfe-107 Changed src for brand payEx image
Browse files Browse the repository at this point in the history
  • Loading branch information
PriJoh committed Dec 17, 2024
1 parent 463fe89 commit 171ba7e
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 11 deletions.
16 changes: 6 additions & 10 deletions src/App/ComponentsDocumentation/components/Card/constantspayex.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export const overviewCards = {
isButton={defaultOptionsValues.isButton}
isWide={false}
hasTitle={defaultOptionsValues.hasTitle}
imgSrc={defaultOptionsValues.imgSrc}
imgSrc={imgSrcURL}
iconClasses={defaultOptionsValues.iconClasses}
hasTextContent={defaultOptionsValues.hasTextContent}
imgRatio={defaultOptionsValues.imgRatio}
Expand Down Expand Up @@ -85,26 +85,23 @@ export const overviewCards = {
{
name: "With image - 16/9 ratio",
value: {
imgSrc:
"https://design.swedbankpay.com/v/10.10.1/img/documentation/imagery/women-on-bus.svg",
imgSrc: imgSrcURL,
icon: null,
imgRatio: "ratio-16-9",
},
},
{
name: "With image - 4/3 ratio",
value: {
imgSrc:
"https://design.swedbankpay.com/v/10.10.1/img/documentation/imagery/women-on-bus.svg",
imgSrc: imgSrcURL,
icon: null,
imgRatio: "ratio-4-3",
},
},
{
name: "With image - 1/1 ratio",
value: {
imgSrc:
"https://design.swedbankpay.com/v/10.10.1/img/documentation/imagery/women-on-bus.svg",
imgSrc: imgSrcURL,
icon: null,
imgRatio: "ratio-1-1",
},
Expand Down Expand Up @@ -185,7 +182,7 @@ export const overviewCards = {
isButton={defaultOptionsValues.isButton}
isWide={true}
hasTitle={defaultOptionsValues.hasTitle}
imgSrc={defaultOptionsValues.imgSrc}
imgSrc={imgSrcURL}
iconClasses={defaultOptionsValues.iconClasses}
hasTextContent={defaultOptionsValues.hasTextContent}
imgRatio={defaultOptionsValues.imgRatio}
Expand Down Expand Up @@ -236,8 +233,7 @@ export const overviewCards = {
{
name: "With image",
value: {
imgSrc:
"https://design.swedbankpay.com/v/10.10.1/img/documentation/imagery/women-on-bus.svg",
imgSrc: imgSrcURL,
icon: null,
imgRatio: null,
},
Expand Down
8 changes: 7 additions & 1 deletion src/App/ComponentsDocumentation/components/Card/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import CardComponent from "@components/Card";

import MediaObject from "@components/MediaObject";
import CodeTags from "@components/CodeTags";
import { overviewCards } from "./constants";
//import { overviewCards } from "./constants";

const textArr = [
"This is a lot of text",
Expand All @@ -20,6 +20,12 @@ const textArr = [
const basename = process.env.basename;
const brand = process.env.brand;

const constants = brand === "payex"
? require("./constantspayex") // Hämtar payex-konstanten
: require("./constants"); // Hämtar swedbankpay-konstanten

export const { overviewCards } = constants;

const Overview = () => {
return (
<>
Expand Down

0 comments on commit 171ba7e

Please sign in to comment.