Skip to content

Added Menu tests #28

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jan 31, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,6 @@ yarn-error.log*
.idea/*

# Index files are built automatically by create-index
src/**/index.js
src/**/index.js

.vscode
15 changes: 15 additions & 0 deletions .storybook/stories/Menu.stories.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import React from 'react'
import Menu from '../../src/menu/Menu'

export default { title: 'Menu' }

const root = {
text: 'category',
items: [
{ text: 'item1', href: '/item1', as: '/item1', items: [] },
{ text: 'item2', href: '/item2', as: '/item2' },
{ text: 'item3', href: '/item3', as: '/item3' },
],
}

export const open = () => <Menu open root={root} />
7 changes: 7 additions & 0 deletions .storybook/stories/MenuButton.stories.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import React from 'react'
import MenuButton from '../../src/menu/MenuButton'

export default { title: 'MenuButton' }

export const closed = () => <MenuButton />
export const open = () => <MenuButton open />
Loading