Skip to content

Commit

Permalink
SWED-2279 style new color page SBP
Browse files Browse the repository at this point in the history
  • Loading branch information
goldenraphti committed Oct 26, 2023
1 parent f0fa9b3 commit 1229459
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 48 deletions.
21 changes: 7 additions & 14 deletions src/App/Identity/identity/Color/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ const SBPrimaryColors = () => (
)}
<div className="color-group pt-3">
{sbColors.primaryBrandColors.map((color, i) => (
<DisplayColor key={i} {...color} setColorViaSubtitle={false} />
<DisplayColor key={i} {...color} />
))}
</div>
<div className="container mt-5">
Expand Down Expand Up @@ -139,7 +139,7 @@ const SBBrandAccentColors = () => (
</p>
<div className="color-group">
{sbColors.accentBrandColors.map((color, i) => (
<DisplayColor key={i} {...color} setColorViaSubtitle={false} />
<DisplayColor key={i} {...color} />
))}
</div>
<div className="container mt-5">
Expand Down Expand Up @@ -251,7 +251,6 @@ const SBTextColors = () => (
key={i}
isSizeLarge={false}
isVertical={false}
setColorViaSubtitle={true}
{...color}
/>
))}
Expand Down Expand Up @@ -286,7 +285,6 @@ const SBTextColors = () => (
isSizeLarge={false}
isVertical={false}
{...color}
setColorViaSubtitle={true}
/>
))}
</ul>
Expand Down Expand Up @@ -318,7 +316,6 @@ const SBTextColors = () => (
key={i}
isSizeLarge={false}
isVertical={false}
setColorViaSubtitle={true}
{...color}
/>
))}
Expand Down Expand Up @@ -353,7 +350,6 @@ const SBBackgroundColors = () => (
{...color}
isSizeLarge={false}
isVertical={false}
setColorViaSubtitle={true}
/>
))}
</div>
Expand All @@ -378,7 +374,6 @@ const SBSystemColors = () => (
{...color}
isSizeLarge={false}
isVertical={false}
setColorViaSubtitle={true}
/>
))}
</div>
Expand All @@ -391,7 +386,6 @@ const SBSystemColors = () => (
{...color}
isSizeLarge={false}
isVertical={false}
setColorViaSubtitle={true}
/>
))}
</div>
Expand All @@ -415,7 +409,6 @@ const SBColorPool = () => (
{...color}
isSizeLarge={false}
isVertical={false}
setColorViaSubtitle={false}
/>
))}
</div>
Expand All @@ -432,7 +425,7 @@ const MainColors = () => (
</p>
<div className="color-group flex-wrap">
{pxColors.mainText.map((color, i) => (
<DisplayColor key={i} {...color} setColorViaSubtitle={false} />
<DisplayColor key={i} {...color} />
))}
</div>
</section>
Expand All @@ -449,7 +442,7 @@ const PayexComplementaryColors = () => (
</p>
<div className="color-group">
{pxColors.complementaryColors.map((color, i) => (
<DisplayColor key={i} {...color} setColorViaSubtitle={false} />
<DisplayColor key={i} {...color} />
))}
</div>
</section>
Expand All @@ -464,7 +457,7 @@ const PayexButtonColors = () => (
</p>
<div className="color-group">
{pxColors.buttonColors.map((color, i) => (
<DisplayColor key={i} {...color} setColorViaSubtitle={false} />
<DisplayColor key={i} {...color} />
))}
</div>
</section>
Expand All @@ -480,7 +473,7 @@ const PayexBackgroundColors = () => (
</p>
<div className="color-group">
{pxColors.backgroundColors.map((color, i) => (
<DisplayColor key={i} {...color} setColorViaSubtitle={false} />
<DisplayColor key={i} {...color} />
))}
</div>
</section>
Expand All @@ -495,7 +488,7 @@ const PayexSystemColors = () => (
</p>
<div className="color-group">
{pxColors.systemColors.map((color, i) => (
<DisplayColor key={i} {...color} setColorViaSubtitle={false} />
<DisplayColor key={i} {...color} />
))}
</div>
</section>
Expand Down
26 changes: 13 additions & 13 deletions src/App/Identity/identity/Color/swedbankpay-colors.js
Original file line number Diff line number Diff line change
Expand Up @@ -222,37 +222,37 @@ export const functionalColors = [
export const colorPool = [
{
title: "Primary",
subTitle: "yellow-primary",
subTitle: "brand-yellow",
hex: "#FDC129",
},
{
title: "Yellow light",
subTitle: "yellow-light",
subTitle: "brand-yellow-light",
hex: "#FCE4A1",
},
{
title: "Yellow lighter",
subTitle: "yellow-lighter",
subTitle: "brand-yellow-lighter",
hex: "#FFF3D5",
},
{
title: "Turquoise",
subTitle: "turquoise",
subTitle: "brand-turquoise",
hex: "#31A3AE",
},
{
title: "Turquoise light",
subTitle: "turquoise-light",
subTitle: "brand-turquoise-light",
hex: "#8ACDC3",
},
{
title: "Turquoise lighter",
subTitle: "turquoise-lighter",
subTitle: "brand-turquoise-lighter",
hex: "#EBF8F2",
},
{
title: "Purple",
subTitle: "brand-purple",
subTitle: "purple",
hex: "#642f93",
},
{
Expand All @@ -267,7 +267,7 @@ export const colorPool = [
},
{
title: "Orange",
subTitle: "orange",
subTitle: "brand-orange",
hex: "#EE7023",
},
{
Expand All @@ -277,7 +277,7 @@ export const colorPool = [
},
{
title: "Orange lighter",
subTitle: "orange-lighter",
subTitle: "brand-orange-lighter",
hex: "#FBEADB",
},
{
Expand All @@ -292,7 +292,7 @@ export const colorPool = [
},
{
title: "Green lighter",
subTitle: "green-lighter",
subTitle: "brand-green-lighter",
hex: "#E7F8D2",
},
{
Expand Down Expand Up @@ -322,12 +322,12 @@ export const colorPool = [
},
{
title: "Red lighter",
subTitle: "red-lighter",
subTitle: "brand-red-lighter",
hex: "#FFE9E9",
},
{
title: "Blue",
subTitle: "blue",
subTitle: "brand-blue",
hex: "#335BB1",
},
{
Expand All @@ -337,7 +337,7 @@ export const colorPool = [
},
{
title: "Blue lighter",
subTitle: "blue-lighter",
subTitle: "brand-blue-lighter",
hex: "#E0EAF9",
},
{
Expand Down
3 changes: 1 addition & 2 deletions src/App/components/DisplayColor/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ const DisplayColor = ({
hasBorderOverWhiteBG = false,
isSizeLarge = true,
isVertical = true,
setColorViaSubtitle = false,
}) => {
if (isSizeLarge) {
return (
Expand Down Expand Up @@ -36,7 +35,7 @@ const DisplayColor = ({
hasBorderOverWhiteBG ? "border" : ""
}`}
style={{
"--bg-color": setColorViaSubtitle ? `var(--${subTitle})` : hex,
"--bg-color": `var(--${subTitle}, ${hex})`,
}}
></div>
<div className="d-flex flex-column">
Expand Down
2 changes: 0 additions & 2 deletions src/less/variables-payex.less
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,6 @@
@green-syntax-highlight: #99cc66;
@blue-syntax-highlight: #43d0dd;
@yellow-syntax-highlight: #fff3d5;
@pink-cards-details: #c5569a;
@dark-brown: @brand-secondary;
@light-brown: @brand-secondary-light-3;
@help-block-text: #707070;
Expand Down Expand Up @@ -261,7 +260,6 @@ body {
--green-syntax-highlight: #99cc66;
--blue-syntax-highlight: #43d0dd;
--yellow-syntax-highlight: #fff3d5;
--pink-cards-details: #c5569a;
--dark-brown: var(--brand-secondary, #3c3c3c);
--light-brown: var(--brand-secondary-light-3, #c8c8c8);
--help-block-text: #707070;
Expand Down
17 changes: 0 additions & 17 deletions src/less/variables-swedbankpay.less
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,6 @@
@green-syntax-highlight: #99cc66;
@blue-syntax-highlight: #43d0dd;
@yellow-syntax-highlight: @brand-primary-light-3;
@pink-cards-details: #c5569a;

/* ==================================CSS VARIABLES========================================
*
Expand Down Expand Up @@ -194,26 +193,11 @@

// Color pool
--brand-turquoise-lighter: #ebf8f2;
// --brand-purple: #642f93;
// --brand-purple-light: #c58af9;
--brand-purple-lighter: #f1e0ff;
// --brand-orange-light: #ffba69;
--brand-orange-lighter: #fbeadb;
// --brand-green: #497125;
// --brand-green-light: #70b63a;
--brand-green-lighter: #e7f8d2;
// --brand-mahogany: #4c2d2c;
// --brand-mahogany-light: #965e5c;
// --brand-mahogany-lighter: #eec4c4;
// --brand-red: #a62825;
// --brand-red-light: #efb7b6;
--brand-red-lighter: #ffe9e9;
--brand-blue: #335bb1;
// --brand-blue-light: #65a0e4;
--brand-blue-lighter: #e0eaf9;
// --brand-fuchsia: #b9297f;
// --brand-fuchsia-light: #fbbbe1;
// --brand-fuchsia-lighter: #ffeefc;

// Functional colors
--base-1: var(--text-default);
Expand All @@ -230,7 +214,6 @@
--bg-orange: #fff1e4;
--bg-white: var(--white, #ffffff);
--bg-turquoise: var(--brand-turquoise-lighter, #ebf8f2);
// TODO: update bg colors in LESS variables and in component

// System colors
--system-success: #4d9c0f;
Expand Down

0 comments on commit 1229459

Please sign in to comment.