From b6535b10d4461e5e1f3aeb1e2686f411fff273d9 Mon Sep 17 00:00:00 2001 From: Hugo ATTAL Date: Fri, 4 Feb 2022 19:22:24 +0100 Subject: [PATCH] feat: Add dark mode (fix #2) (#12) --- packages/histoire/package.json | 1 + packages/histoire/src/client/app/App.vue | 6 ++- .../client/app/components/StoryListItem.vue | 4 +- .../app/components/StoryVariantGridItem.vue | 4 +- .../app/components/StoryVariantItem.vue | 6 +-- .../app/components/StoryVariantSingleView.vue | 4 +- .../src/client/app/components/StoryView.vue | 6 +-- .../app/components/base/BaseSplitPane.vue | 4 +- .../src/client/app/components/ui/UIHeader.vue | 33 +++++++++++++ pnpm-lock.yaml | 48 +++++++++++++++++++ 10 files changed, 100 insertions(+), 16 deletions(-) create mode 100644 packages/histoire/src/client/app/components/ui/UIHeader.vue diff --git a/packages/histoire/package.json b/packages/histoire/package.json index 24dbee5c..18240e72 100644 --- a/packages/histoire/package.json +++ b/packages/histoire/package.json @@ -48,6 +48,7 @@ "vue-router": "^4.0.0" }, "devDependencies": { + "@iconify/vue": "^3.1.3", "@types/node": "^14.14.21", "autoprefixer": "^10.4.2", "concurrently": "^7.0.0", diff --git a/packages/histoire/src/client/app/App.vue b/packages/histoire/src/client/app/App.vue index 571ff25c..596f08f5 100644 --- a/packages/histoire/src/client/app/App.vue +++ b/packages/histoire/src/client/app/App.vue @@ -5,6 +5,7 @@ import { useStoryStore } from './stores/story' import StoryList from './components/StoryList.vue' import BaseSplitPane from './components/base/BaseSplitPane.vue' import { shallowRef } from 'vue' +import UIHeader from './components/ui/UIHeader.vue' const storyStore = useStoryStore() @@ -13,6 +14,7 @@ const files = shallowRef(rawFiles) onUpdate((newValue) => { files.value = newValue }) + -
+
+ + {{ story.title }} diff --git a/packages/histoire/src/client/app/components/StoryVariantGridItem.vue b/packages/histoire/src/client/app/components/StoryVariantGridItem.vue index 30a95fce..b84ad8a1 100644 --- a/packages/histoire/src/client/app/components/StoryVariantGridItem.vue +++ b/packages/histoire/src/client/app/components/StoryVariantGridItem.vue @@ -41,9 +41,9 @@ const { isActive, targetRoute } = useCurrentVariantRoute(variant)
diff --git a/packages/histoire/src/client/app/components/StoryVariantItem.vue b/packages/histoire/src/client/app/components/StoryVariantItem.vue index 3d26a789..f1615790 100644 --- a/packages/histoire/src/client/app/components/StoryVariantItem.vue +++ b/packages/histoire/src/client/app/components/StoryVariantItem.vue @@ -18,10 +18,8 @@ const { isActive, targetRoute } = useCurrentVariantRoute(variant)
{{ variant.title }} diff --git a/packages/histoire/src/client/app/components/StoryVariantSingleView.vue b/packages/histoire/src/client/app/components/StoryVariantSingleView.vue index 5e35c4ef..e5809e48 100644 --- a/packages/histoire/src/client/app/components/StoryVariantSingleView.vue +++ b/packages/histoire/src/client/app/components/StoryVariantSingleView.vue @@ -17,7 +17,7 @@ defineProps({
diff --git a/packages/histoire/src/client/app/components/StoryView.vue b/packages/histoire/src/client/app/components/StoryView.vue index 9ca6e5ff..8cea8199 100644 --- a/packages/histoire/src/client/app/components/StoryView.vue +++ b/packages/histoire/src/client/app/components/StoryView.vue @@ -61,10 +61,10 @@ watch(() => storyStore.currentStory, () => { class="htw-h-full" >