From 3ed9c132fc0e52fc256dd6e2fcabe2191373d055 Mon Sep 17 00:00:00 2001 From: JCNoguera <88061365+VmMad@users.noreply.github.com> Date: Mon, 25 Nov 2024 19:41:40 +0100 Subject: [PATCH 1/7] feat(explorer): add theme switcher (#4041) * feat(explorer): add theme switcher * fix: add missing style to the icon * fix: lint * refactor: remove theme context from explorer * feat(explorer): add background to search suggestions (#4162) * feat(explorer): add backgrounds to the search suggestions * refactor: add styles to search ui kit * revert changes * fix: remove unnecessary backdrop-blur * fix: remove map * feat(explorer): add darkmode support to epoch page (#4160) * feat: polish darkmode * fix format * feat: update imports * feat(explorer): improve darkmode colors for transaction page (#4158) * feat(explorer): improve darkmode colors for transaction page * feat: add button to the split panes --------- Co-authored-by: evavirseda --- .../src/components/ThemedIotaLogo.tsx | 8 +++ .../explorer/src/components/footer/Footer.tsx | 12 ++--- .../components/gas-breakdown/GasBreakdown.tsx | 10 ++-- .../explorer/src/components/header/Header.tsx | 12 +++-- .../src/components/header/ThemeSwitcher.tsx | 53 +++++++++++++++++++ apps/explorer/src/components/header/index.ts | 1 + apps/explorer/src/components/index.ts | 1 + .../explorer/src/components/layout/Layout.tsx | 10 ++-- .../src/components/layout/PageLayout.tsx | 2 +- .../components/module/PkgModulesWrapper.tsx | 2 +- .../components/object/ObjectFieldsCard.tsx | 2 +- .../explorer/src/components/search/Search.tsx | 2 +- .../transactions/ProgTxnBlockCard.tsx | 2 +- .../src/components/ui/ProgressBar.tsx | 4 +- apps/explorer/src/components/ui/RingChart.tsx | 6 ++- .../explorer/src/components/ui/SplitPanes.tsx | 34 +++++------- .../ui/collapsible/CollapsibleCard.tsx | 4 +- apps/explorer/src/index.css | 8 +++ .../explorer/src/pages/epochs/EpochDetail.tsx | 8 +-- .../pages/epochs/stats/ValidatorStatus.tsx | 19 +++++-- .../Transaction.tsx | 2 +- .../transaction-summary/BalanceChanges.tsx | 3 +- apps/explorer/tailwind.config.ts | 1 + .../components/molecules/search/Search.tsx | 2 +- 24 files changed, 147 insertions(+), 61 deletions(-) create mode 100644 apps/explorer/src/components/ThemedIotaLogo.tsx create mode 100644 apps/explorer/src/components/header/ThemeSwitcher.tsx diff --git a/apps/explorer/src/components/ThemedIotaLogo.tsx b/apps/explorer/src/components/ThemedIotaLogo.tsx new file mode 100644 index 00000000000..71a42a49a8d --- /dev/null +++ b/apps/explorer/src/components/ThemedIotaLogo.tsx @@ -0,0 +1,8 @@ +// Copyright (c) 2024 IOTA Stiftung +// SPDX-License-Identifier: Apache-2.0 + +import { IotaLogoWeb } from '@iota/ui-icons'; + +export function ThemedIotaLogo(): React.JSX.Element { + return ; +} diff --git a/apps/explorer/src/components/footer/Footer.tsx b/apps/explorer/src/components/footer/Footer.tsx index e5f17ca794f..b9ec00af211 100644 --- a/apps/explorer/src/components/footer/Footer.tsx +++ b/apps/explorer/src/components/footer/Footer.tsx @@ -4,9 +4,9 @@ import { Divider } from '@iota/apps-ui-kit'; import { LegalLinks, LegalText } from './Legal'; -import { IotaLogoWeb } from '@iota/ui-icons'; import { Link } from '~/components/ui'; import { FOOTER_LINKS } from '~/lib/constants'; +import { ThemedIotaLogo } from '../ThemedIotaLogo'; function FooterLinks(): JSX.Element { return ( @@ -26,11 +26,11 @@ function FooterLinks(): JSX.Element { function Footer(): JSX.Element { return ( -