Skip to content

Commit eef7397

Browse files
committed
feat(cheatsheet): link dist/svg to cheatsheet icons
1 parent 98fa89e commit eef7397

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

scripts/build.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ async function createCheatsheet(
261261
const distCheatsheetFilePath = join(distDir, 'cheatsheet.html');
262262

263263
const c = srcSvgData.map(
264-
(svgData) => `<svg><use href="#${svgData.iconName}" xlink:href="#${svgData.iconName}"/></svg>`,
264+
(svgData) => `<a href="./svg/${svgData.fileName}"><svg><use href="#${svgData.iconName}" xlink:href="#${svgData.iconName}"/></svg></a>`,
265265
);
266266

267267
c.push(svgSymbolsContent);

scripts/cheatsheet-template.html

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,13 @@
2323
width: 32px;
2424
height: 32px;
2525
}
26+
a {
27+
color: inherit;
28+
text-decoration: none;
29+
}
30+
a:hover {
31+
opacity: 0.7;
32+
}
2633
</style>
2734
</head>
2835
<body>

0 commit comments

Comments
 (0)