-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
263a4fe
commit fb0f25e
Showing
11 changed files
with
226 additions
and
211 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,68 +1,70 @@ | ||
import { Meta, StoryObj } from "@storybook/react"; | ||
import { ImageColorSchemeSwitch } from "./ImageColorSchemeSwitch"; | ||
|
||
import imageDark from "../public/generic/logo-dark.svg" | ||
import imageLight from "../public/generic/logo-light.svg" | ||
import imageDark from "../public/generic/logo-dark.svg"; | ||
import imageLight from "../public/generic/logo-light.svg"; | ||
|
||
const meta: Meta<typeof ImageColorSchemeSwitch> = { | ||
title: "SciReactUI/Control/ImageColorSchemeSwitch", | ||
component: ImageColorSchemeSwitch, | ||
tags: ["autodocs"], | ||
parameters: { | ||
docs: { | ||
description: { | ||
component: 'Switch between an image depending on the color scheme mode, light or dark versions' | ||
}, | ||
}, | ||
}, | ||
title: "SciReactUI/Control/ImageColorSchemeSwitch", | ||
component: ImageColorSchemeSwitch, | ||
tags: ["autodocs"], | ||
parameters: { | ||
docs: { | ||
description: { | ||
component: | ||
"Switch between an image depending on the color scheme mode, light or dark versions", | ||
}, | ||
}, | ||
}, | ||
}; | ||
|
||
export default meta; | ||
type Story = StoryObj<typeof meta>; | ||
|
||
export const SwitchingImage: Story = { | ||
args: { | ||
image: { | ||
src: imageDark, | ||
srcDark: imageLight, | ||
alt: "Testing Switching Image", | ||
width: "100" | ||
} | ||
}, | ||
parameters: { | ||
docs: { | ||
description: { | ||
story: 'This image changes depending on the color scheme mode selected.' | ||
}, | ||
}, | ||
}, | ||
args: { | ||
image: { | ||
src: imageDark, | ||
srcDark: imageLight, | ||
alt: "Testing Switching Image", | ||
width: "100", | ||
}, | ||
}, | ||
parameters: { | ||
docs: { | ||
description: { | ||
story: | ||
"This image changes depending on the color scheme mode selected.", | ||
}, | ||
}, | ||
}, | ||
}; | ||
|
||
|
||
export const LargeSwitchingImage: Story = { | ||
args: { | ||
image: { | ||
src: imageDark, | ||
srcDark: imageLight, | ||
alt: "Testing Switching Image", | ||
width: "300" | ||
} | ||
}, | ||
args: { | ||
image: { | ||
src: imageDark, | ||
srcDark: imageLight, | ||
alt: "Testing Switching Image", | ||
width: "300", | ||
}, | ||
}, | ||
}; | ||
|
||
export const NonSwitchingImage: Story = { | ||
args: { | ||
image: { | ||
src: imageLight, | ||
alt: "Testing Non-Switching Image", | ||
width: "300" | ||
} | ||
}, | ||
parameters: { | ||
docs: { | ||
description: { | ||
story: 'This image only has a single src so will NOT switch when the color scheme mode switches.' | ||
}, | ||
}, | ||
}, | ||
args: { | ||
image: { | ||
src: imageLight, | ||
alt: "Testing Non-Switching Image", | ||
width: "300", | ||
}, | ||
}, | ||
parameters: { | ||
docs: { | ||
description: { | ||
story: | ||
"This image only has a single src so will NOT switch when the color scheme mode switches.", | ||
}, | ||
}, | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.