-
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.
- Loading branch information
1 parent
cc38f20
commit d20e064
Showing
21 changed files
with
165 additions
and
46 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
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 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
import nciNav from '@/nci/app/components/nci-nav/index.vue' | ||
|
||
import { Nav } from '@/nci/app/interfaces/' | ||
|
||
/** Import Storybook resources */ | ||
import { Story } from '@storybook/vue'; | ||
import { storyItem } from '@/nci/storybook/'; | ||
|
||
/** Import tailwind map config for defaults (e.g. image sizes) */ | ||
import Theme from '@/nci/theme/default-light'; | ||
|
||
import recurseInject from '@/nci/app/injectors/recurseInject' | ||
|
||
import injectObject from '@/nci/app/injectors/injectObject' | ||
|
||
/** Create a single component export and corresponding template and args */ | ||
import generateProps from '@/nci/storybook/factories/generateProps' | ||
|
||
import config from '@/nci/data/demo' | ||
|
||
const content = recurseInject(config.pages, Theme) | ||
const props = injectObject(Theme.anchor, config.nav) | ||
|
||
console.log('stylees', props.styles) | ||
/** Construct the sidebar Menu Item */ | ||
const StoryMenuItem = storyItem('Components/Nav', nciNav); | ||
|
||
/** Export the sidebar Menu Item */ | ||
export default StoryMenuItem; | ||
|
||
const Template: Story<Nav> = (args: Nav) => ({ | ||
components: { nciNav }, | ||
props: generateProps(args), /* dont need injectObject here? */ | ||
template: `<nci-nav v-bind="$props"/>` | ||
}); | ||
|
||
|
||
/* Construct the routes object from the config.pages */ | ||
|
||
const routes = [ | ||
{ | ||
path: "https://www.nuxt.org", | ||
name: "Home" | ||
}, | ||
{ | ||
path: "https://www.nuxt.org", | ||
name: "About" | ||
} | ||
] | ||
|
||
const data = { | ||
styles: "nav", | ||
childStyles: props.styles, | ||
routes: routes, | ||
} | ||
|
||
console.log('generateprops', generateProps(data), data) | ||
/** Bind and export the Story */ | ||
export const nav: Story<Nav> = Template.bind({}); | ||
nav.args = data | ||
|
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 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 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
File renamed without changes.
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 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 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 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.