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: >-
4
4
This reference page provides examples of various scenarios to illustrate the Mathematical Representations of OIS.
5
5
---
6
6
7
- import DualModeImage from " ../../../src/components/dual-mode-image " ;
7
+ import DualModeImage from " ../../../src/components/DualModeImage " ;
8
8
9
9
NOTE: All the symbols used in the examples are explained in the [ Mathematical Representation] ( ./mathematical-representation ) section.
10
10
Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ description: >-
5
5
on the Pyth network.
6
6
---
7
7
8
- import DualModeImage from " ../../../src/components/dual-mode-image " ;
8
+ import DualModeImage from " ../../../src/components/DualModeImage " ;
9
9
10
10
# Purpose and Scope
11
11
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" ;
1
2
import { ImageZoom } from "fumadocs-ui/components/image-zoom" ;
2
3
import Image from "next/image" ;
3
4
import type { ComponentProps } from "react" ;
4
5
6
+ import styles from "./index.module.scss" ;
7
+
5
8
type ImageProps = ComponentProps < typeof Image > ;
6
9
type Props = Omit < ImageProps , "src" > & {
7
10
darkSrc : string ;
@@ -30,12 +33,12 @@ const DualModeImage = ({
30
33
< >
31
34
< ImageZoom
32
35
src = { lightSrc }
33
- className = { `dark:hidden ${ className ?? "" } ` }
36
+ className = { clsx ( styles . lightImage , className ) }
34
37
{ ...commonProps }
35
38
/>
36
39
< ImageZoom
37
40
src = { darkSrc }
38
- className = { `hidden dark:block ${ className ?? "" } ` }
41
+ className = { clsx ( styles . darkImage , className ) }
39
42
{ ...commonProps }
40
43
/>
41
44
</ >
You can’t perform that action at this time.
0 commit comments