File tree Expand file tree Collapse file tree 4 files changed +22
-4
lines changed
content/docs/oracle-integrity-staking
src/components/DualModeImage Expand file tree Collapse file tree 4 files changed +22
-4
lines changed Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ description: >-
44 This reference page provides examples of various scenarios to illustrate the Mathematical Representations of OIS.
55---
66
7- import DualModeImage from " ../../../src/components/dual-mode-image " ;
7+ import DualModeImage from " ../../../src/components/DualModeImage " ;
88
99NOTE: All the symbols used in the examples are explained in the [ Mathematical Representation] ( ./mathematical-representation ) section.
1010
Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ description: >-
55 on the Pyth network.
66---
77
8- import DualModeImage from " ../../../src/components/dual-mode-image " ;
8+ import DualModeImage from " ../../../src/components/DualModeImage " ;
99
1010# Purpose and Scope
1111
Original file line number Diff line number Diff line change 1+ .lightImage {
2+ display : block ;
3+
4+ :global (.dark ) & {
5+ display : none ;
6+ }
7+ }
8+
9+ .darkImage {
10+ display : none ;
11+
12+ :global (.dark ) & {
13+ display : block ;
14+ }
15+ }
Original file line number Diff line number Diff line change 1+ import clsx from "clsx" ;
12import { ImageZoom } from "fumadocs-ui/components/image-zoom" ;
23import Image from "next/image" ;
34import type { ComponentProps } from "react" ;
45
6+ import styles from "./index.module.scss" ;
7+
58type ImageProps = ComponentProps < typeof Image > ;
69type Props = Omit < ImageProps , "src" > & {
710 darkSrc : string ;
@@ -30,12 +33,12 @@ const DualModeImage = ({
3033 < >
3134 < ImageZoom
3235 src = { lightSrc }
33- className = { `dark:hidden ${ className ?? "" } ` }
36+ className = { clsx ( styles . lightImage , className ) }
3437 { ...commonProps }
3538 />
3639 < ImageZoom
3740 src = { darkSrc }
38- className = { `hidden dark:block ${ className ?? "" } ` }
41+ className = { clsx ( styles . darkImage , className ) }
3942 { ...commonProps }
4043 />
4144 </ >
You can’t perform that action at this time.
0 commit comments