Skip to content

Commit bb22812

Browse files
Merge pull request #2435 from dxc-technology/jialecl/themeImages
Tokens export file name changed and added imports for the images
2 parents 8fc11b4 + a0efa56 commit bb22812

4 files changed

Lines changed: 5 additions & 3 deletions

File tree

apps/website/screens/theme-generator/ThemeGeneratorPage.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ import {
1111
import Link from "next/link";
1212
import LandingCards from "./components/LandingCards";
1313
import LandingSteps from "./components/LandingSteps";
14+
import landingImage from "./images/theme-generator-landing-bg.png";
15+
import landingImageFlipped from "./images/theme-generator-landing-bg-flipped.png";
1416

1517
const steps = [
1618
{
@@ -58,7 +60,7 @@ const ThemeGeneratorPage = () => {
5860
width="100%"
5961
boxSizing="border-box"
6062
background={{
61-
image: "url(/theme-generator-landing-bg.png)",
63+
image: `url(${landingImage.src})`,
6264
position: "0px 50%",
6365
size: "cover",
6466
}}
@@ -114,7 +116,7 @@ const ThemeGeneratorPage = () => {
114116
width="100%"
115117
boxSizing="border-box"
116118
background={{
117-
image: "url(/theme-generator-landing-bg-flipped.png)",
119+
image: `url(${landingImageFlipped.src})`,
118120
size: "cover",
119121
}}
120122
height="329px"

apps/website/public/theme-generator-landing-bg-flipped.png renamed to apps/website/screens/theme-generator/images/theme-generator-landing-bg-flipped.png

File renamed without changes.

apps/website/public/theme-generator-landing-bg.png renamed to apps/website/screens/theme-generator/images/theme-generator-landing-bg.png

File renamed without changes.

apps/website/screens/theme-generator/utils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ export const handleExport = (themeJson: string) => {
9797
const dataStr = "data:text/json;charset=utf-8," + encodeURIComponent(themeJson);
9898
const downloadAnchorNode = document.createElement("a");
9999
downloadAnchorNode.setAttribute("href", dataStr);
100-
downloadAnchorNode.setAttribute("download", "halstack-theme-tokens.json");
100+
downloadAnchorNode.setAttribute("download", "halstack-theme.json");
101101
document.body.appendChild(downloadAnchorNode);
102102
downloadAnchorNode.click();
103103
downloadAnchorNode.remove();

0 commit comments

Comments
 (0)