-
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
Showing
38 changed files
with
11,059 additions
and
13,143 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<template> | ||
<v-app :theme="themeName" :full-height="false"> | ||
<v-main> | ||
<slot name="story"></slot> | ||
</v-main> | ||
</v-app> | ||
</template> | ||
|
||
<script> | ||
export default { | ||
props: { | ||
themeName: String | ||
} | ||
} | ||
</script> |
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,21 @@ | ||
import { h } from 'vue' | ||
|
||
import StoryWrapper from './StoryWrapper.vue' | ||
|
||
export const DEFAULT_THEME = 'customLightTheme' | ||
|
||
export const withVuetifyTheme = (storyFn, context) => { | ||
// Pull our global theme variable, fallback to DEFAULT_THEME | ||
const themeName = context.globals.theme || DEFAULT_THEME | ||
const story = storyFn() | ||
|
||
return () => { | ||
return h( | ||
StoryWrapper, | ||
{ themeName }, | ||
{ | ||
story: () => h(story, { ...context.args }) | ||
} | ||
) | ||
} | ||
} |
Oops, something went wrong.