-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
storybook: add next gen docs format mdx; code documentation and clean…
…up; more tests
- Loading branch information
1 parent
5bd8d22
commit 0cb7a6d
Showing
18 changed files
with
5,080 additions
and
2,088 deletions.
There are no files selected for viewing
This file was deleted.
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,3 +1,11 @@ | ||
import { configure } from '@storybook/react'; | ||
import { configure, addParameters } from '@storybook/react'; | ||
import { DocsPage, DocsContainer } from '@storybook/addon-docs/blocks'; | ||
|
||
configure(require.context('../src', true, /\.stories\.js$/), module); | ||
addParameters({ | ||
docs: { | ||
container: DocsContainer, | ||
page: DocsPage, | ||
}, | ||
}); | ||
|
||
configure(require.context('../src', true, /\.stories\.(js|mdx)$/), module); |
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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
module.exports = [ | ||
"@storybook/addon-docs/react/preset" | ||
]; |
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
Large diffs are not rendered by default.
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
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
This file was deleted.
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 |
---|---|---|
@@ -0,0 +1,70 @@ | ||
import { | ||
Meta, | ||
Story, | ||
Preview, | ||
Props, | ||
Description | ||
} from "@storybook/addon-docs/blocks"; | ||
import HoverSlideshow from "./HoverSlideshow"; | ||
|
||
<Meta title="Demos|HoverSlideshow" component={HoverSlideshow} /> | ||
|
||
# HoverSlideshow | ||
|
||
<br /> | ||
|
||
## Description | ||
|
||
<Description of={HoverSlideshow} /> | ||
|
||
## Props | ||
|
||
<Props of={HoverSlideshow} /> | ||
|
||
## Preview | ||
|
||
<Preview> | ||
<Story name="default (horizontal axis)"> | ||
<HoverSlideshow | ||
aria-label="Muybridge horse gallop slideshow" | ||
width="410px" | ||
height="308px" | ||
images={[ | ||
"https://raw.githubusercontent.com/davidcalhoun/react-hover-slideshow/master/static/01.jpg", | ||
"https://raw.githubusercontent.com/davidcalhoun/react-hover-slideshow/master/static/02.jpg", | ||
"https://raw.githubusercontent.com/davidcalhoun/react-hover-slideshow/master/static/03.jpg", | ||
"https://raw.githubusercontent.com/davidcalhoun/react-hover-slideshow/master/static/04.jpg", | ||
"https://raw.githubusercontent.com/davidcalhoun/react-hover-slideshow/master/static/05.jpg", | ||
"https://raw.githubusercontent.com/davidcalhoun/react-hover-slideshow/master/static/06.jpg", | ||
"https://raw.githubusercontent.com/davidcalhoun/react-hover-slideshow/master/static/07.jpg", | ||
"https://raw.githubusercontent.com/davidcalhoun/react-hover-slideshow/master/static/08.jpg", | ||
"https://raw.githubusercontent.com/davidcalhoun/react-hover-slideshow/master/static/09.jpg", | ||
"https://raw.githubusercontent.com/davidcalhoun/react-hover-slideshow/master/static/10.jpg", | ||
"https://raw.githubusercontent.com/davidcalhoun/react-hover-slideshow/master/static/11.jpg", | ||
"https://raw.githubusercontent.com/davidcalhoun/react-hover-slideshow/master/static/12.jpg" | ||
]} | ||
/> | ||
</Story> | ||
<Story name="vertical axis"> | ||
<HoverSlideshow | ||
axis="vertical" | ||
aria-label="Muybridge horse gallop slideshow" | ||
width="410px" | ||
height="308px" | ||
images={[ | ||
"https://raw.githubusercontent.com/davidcalhoun/react-hover-slideshow/master/static/01.jpg", | ||
"https://raw.githubusercontent.com/davidcalhoun/react-hover-slideshow/master/static/02.jpg", | ||
"https://raw.githubusercontent.com/davidcalhoun/react-hover-slideshow/master/static/03.jpg", | ||
"https://raw.githubusercontent.com/davidcalhoun/react-hover-slideshow/master/static/04.jpg", | ||
"https://raw.githubusercontent.com/davidcalhoun/react-hover-slideshow/master/static/05.jpg", | ||
"https://raw.githubusercontent.com/davidcalhoun/react-hover-slideshow/master/static/06.jpg", | ||
"https://raw.githubusercontent.com/davidcalhoun/react-hover-slideshow/master/static/07.jpg", | ||
"https://raw.githubusercontent.com/davidcalhoun/react-hover-slideshow/master/static/08.jpg", | ||
"https://raw.githubusercontent.com/davidcalhoun/react-hover-slideshow/master/static/09.jpg", | ||
"https://raw.githubusercontent.com/davidcalhoun/react-hover-slideshow/master/static/10.jpg", | ||
"https://raw.githubusercontent.com/davidcalhoun/react-hover-slideshow/master/static/11.jpg", | ||
"https://raw.githubusercontent.com/davidcalhoun/react-hover-slideshow/master/static/12.jpg" | ||
]} | ||
/> | ||
</Story> | ||
</Preview> |
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,5 +1,6 @@ | ||
.container { | ||
position: relative; | ||
display: inline-block; | ||
} | ||
|
||
.imageContainer { | ||
|
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
This file was deleted.
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 |
---|---|---|
@@ -0,0 +1,49 @@ | ||
import { | ||
Meta, | ||
Story, | ||
Preview, | ||
Props, | ||
Description | ||
} from "@storybook/addon-docs/blocks"; | ||
import HoverSlideshowAnimated from "./HoverSlideshowAnimated"; | ||
import { createNumberedArray } from "./utils"; | ||
|
||
<Meta title="Demos|HoverSlideshowAnimated" component={HoverSlideshowAnimated} /> | ||
|
||
# HoverSlideshowAnimated | ||
|
||
<br /> | ||
|
||
## Description | ||
|
||
<Description of={HoverSlideshowAnimated} /> | ||
|
||
## Props | ||
|
||
<Props of={HoverSlideshowAnimated} /> | ||
|
||
## Preview | ||
|
||
<Preview> | ||
<Story name="default"> | ||
<HoverSlideshowAnimated | ||
aria-label="Muybridge horse gallop slideshow" | ||
width="410px" | ||
height="308px" | ||
images={[ | ||
"https://raw.githubusercontent.com/davidcalhoun/react-hover-slideshow/master/static/01.jpg", | ||
"https://raw.githubusercontent.com/davidcalhoun/react-hover-slideshow/master/static/02.jpg", | ||
"https://raw.githubusercontent.com/davidcalhoun/react-hover-slideshow/master/static/03.jpg", | ||
"https://raw.githubusercontent.com/davidcalhoun/react-hover-slideshow/master/static/04.jpg", | ||
"https://raw.githubusercontent.com/davidcalhoun/react-hover-slideshow/master/static/05.jpg", | ||
"https://raw.githubusercontent.com/davidcalhoun/react-hover-slideshow/master/static/06.jpg", | ||
"https://raw.githubusercontent.com/davidcalhoun/react-hover-slideshow/master/static/07.jpg", | ||
"https://raw.githubusercontent.com/davidcalhoun/react-hover-slideshow/master/static/08.jpg", | ||
"https://raw.githubusercontent.com/davidcalhoun/react-hover-slideshow/master/static/09.jpg", | ||
"https://raw.githubusercontent.com/davidcalhoun/react-hover-slideshow/master/static/10.jpg", | ||
"https://raw.githubusercontent.com/davidcalhoun/react-hover-slideshow/master/static/11.jpg", | ||
"https://raw.githubusercontent.com/davidcalhoun/react-hover-slideshow/master/static/12.jpg" | ||
]} | ||
/> | ||
</Story> | ||
</Preview> |
Oops, something went wrong.