Skip to content

Commit e041333

Browse files
committed
feat: add icons to wallet platforms
1 parent 9d5cb2b commit e041333

File tree

5 files changed

+399
-195
lines changed

5 files changed

+399
-195
lines changed

package-lock.json

Lines changed: 28 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
"prism-react-renderer": "^1.3.5",
2424
"react": "^17.0.2",
2525
"react-dom": "^17.0.2",
26+
"react-icons": "^5.5.0",
2627
"rehype-katex": "^5.0.0",
2728
"remark-math": "^3.0.1"
2829
},

src/pages/wallets.js

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,20 @@ import React from "react";
22
import Link from "@docusaurus/Link";
33
import Layout from "@theme/Layout";
44
import styles from "./wallets.module.css";
5+
import { FaApple, FaAndroid, FaGlobe, FaDesktop, FaTerminal, FaDownload } from "react-icons/fa";
6+
7+
function getPlatformIcon(platform) {
8+
const iconMap = {
9+
iOS: FaApple,
10+
Android: FaAndroid,
11+
APK: FaDownload,
12+
Web: FaGlobe,
13+
Desktop: FaDesktop,
14+
CLI: FaTerminal,
15+
};
16+
const IconComponent = iconMap[platform];
17+
return IconComponent ? <IconComponent className={styles.platformIcon} /> : null;
18+
}
519

620
function WalletCard({ wallet }) {
721
return (
@@ -30,6 +44,7 @@ function WalletCard({ wallet }) {
3044
<div className={styles.walletTags}>
3145
{wallet.platforms.map((platform) => (
3246
<span key={platform} className={`${styles.tag} ${styles.platformTag}`}>
47+
{getPlatformIcon(platform)}
3348
{platform}
3449
</span>
3550
))}
@@ -55,7 +70,10 @@ function CLISection() {
5570
Perfect for developers and advanced users who want direct access to Fedimint's core functionality.
5671
</p>
5772
<div className={styles.walletTags}>
58-
<span className={`${styles.tag} ${styles.platformTag}`}>CLI</span>
73+
<span className={`${styles.tag} ${styles.platformTag}`}>
74+
{getPlatformIcon("CLI")}
75+
CLI
76+
</span>
5977
</div>
6078
<a
6179
href="https://github.com/fedimint/fedimint/"

src/pages/wallets.module.css

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,13 @@
102102
font-weight: 600;
103103
text-transform: uppercase;
104104
letter-spacing: 0.5px;
105+
display: inline-flex;
106+
align-items: center;
107+
gap: 0.4rem;
108+
}
109+
110+
.platformIcon {
111+
font-size: 0.9rem;
105112
}
106113

107114
.platformTag {

0 commit comments

Comments
 (0)