diff --git a/cli/package.json b/cli/package.json index 56ef0272fac..8f6ed040eaa 100644 --- a/cli/package.json +++ b/cli/package.json @@ -15,7 +15,7 @@ "clean": "rm -rf ./dist", "build": "npx tsc --build && tsc-alias && yarn copy", "copy:internal": "copyfiles \"src/**/!(*.ts|*.js|*.tsx)\" dist/cli", - "copy:external": "copyfiles \"../src/common/css/**/!(*.ts|*.js|*.tsx)\" \"../src/common/icons/**/!(*.ts|*.js|*.tsx)\" \"../src/next/css/**/!(*.ts|*.js|*.tsx)\" dist/cli", + "copy:external": "copyfiles \"../src/common/css/**/!(*.ts|*.js|*.tsx)\" \"../src/icons/**/(*.ts|*.js|*.tsx)\" \"../static/icons/**/!(*.ts|*.js|*.tsx)\" \"../src/next/css/**/!(*.ts|*.js|*.tsx)\" dist/cli", "copy": "yarn copy:internal && yarn copy:external", "watch": "nodemon --watch src --ext '*' --exec yarn build", "prepack": "yarn build" diff --git a/src/common/components/CustomNetworkDropdown/index.tsx b/src/common/components/CustomNetworkDropdown/index.tsx index 948d39e04f4..f4e10d70c6e 100644 --- a/src/common/components/CustomNetworkDropdown/index.tsx +++ b/src/common/components/CustomNetworkDropdown/index.tsx @@ -12,12 +12,14 @@ import type { } from '@theme/NavbarItem/DropdownNavbarItem'; import './styles.css'; -import { IotaCore, Shimmer, Next } from '../../icons'; +import icons from '@site/src/icons'; import { fetchSitemapUrlsFromNetwork, getBestNetworkUrlMatch, } from '@site/src/utils/networkUtils'; +const { IotaCore, Shimmer, Next } = icons; + interface NetworkDropdownItem { label: string; routeBasePath: string; diff --git a/src/common/components/Social/index.tsx b/src/common/components/Social/index.tsx index 1837a0a89d9..1c508633249 100644 --- a/src/common/components/Social/index.tsx +++ b/src/common/components/Social/index.tsx @@ -15,6 +15,7 @@ export interface SocialsConfig extends ThemeConfig { function SocialLink({ url, backgroundColor }: Social) { const { name, Icon } = get_socials_data(url); + return ( >; + icon?: string; }; export type Version = Item; @@ -52,6 +52,11 @@ enum SwitcherMenuState { Versions, } +function Icon({ icon, className }: { icon: string; className: string }) { + const Comp = icons[icon]; + return ; +} + type SwitcherMenuDropdownProps = { items: MenuItem[]; active: boolean }; function SwitcherMenuDropdown(props: SwitcherMenuDropdownProps) { @@ -64,7 +69,7 @@ function SwitcherMenuDropdown(props: SwitcherMenuDropdownProps) { >