Skip to content
This repository was archived by the owner on Feb 27, 2024. It is now read-only.

Commit a5d762f

Browse files
author
Greg Rickaby
authored
Merge pull request #29 from WebDevStudios/feature/25-storybook-mdx
Feature/25 storybook mdx
2 parents ca8044d + 22e4c79 commit a5d762f

File tree

15 files changed

+38
-56
lines changed

15 files changed

+38
-56
lines changed

.storybook/main.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ module.exports = {
66
fastRefresh: true,
77
strictMode: true
88
},
9-
stories: ['../components/**/**/*.stories.js'],
9+
stories: ['../components/**/**/*.stories.@(js|mdx)'],
1010
addons: [
1111
'@storybook/addon-a11y',
1212
'@storybook/addon-essentials',
File renamed without changes.
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
import {Canvas, Meta, Story} from '@storybook/addon-docs/blocks'
2+
import {Info, Warning} from './'
3+
4+
<Meta title="Design System/Molecules/Alert" component={Info} />
5+
6+
# Info
7+
8+
Use this component to display an informational alert.
9+
10+
<Canvas>
11+
<Story name="Info">
12+
<Info>This is an Info Alert</Info>
13+
</Story>
14+
</Canvas>
15+
16+
# Warning
17+
18+
Use this component to display an warning alert.
19+
20+
<Canvas>
21+
<Story name="Warning">
22+
<Warning>This is a Warning Alert</Warning>
23+
</Story>
24+
</Canvas>

components/molecules/Alert/index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export {Info, Warning} from './Alert.js'

components/molecules/Alerts.stories.js

Lines changed: 0 additions & 44 deletions
This file was deleted.
File renamed without changes.

components/molecules/Hero.stories.js renamed to components/molecules/Hero/Hero.stories.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import React from 'react'
2-
import Hero from './Hero'
2+
import Hero from './'
33

44
/**
55
* The following is a story.

components/molecules/Hero/index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export {default} from './Hero'

components/organisms/Header.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import Link from 'next/link'
2-
import Navigation from '../molecules/Navigation'
2+
import Navigation from './Navigation'
33

44
function Logo() {
55
return (

0 commit comments

Comments
 (0)