Skip to content

Commit

Permalink
feat(style): add --vue-preview-color-loading
Browse files Browse the repository at this point in the history
  • Loading branch information
litingyes committed Aug 7, 2023
1 parent dd2b517 commit 305c47c
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/VuePreview.vue
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ const isHover = useElementHover(vuePreviewContainerRef)
</Transition>
<Transition v-if="previewUpdateFlag === 'UPDATING'" name="fade">
<div class="vue-preview__loading-model">
<Loading />
<Loading class="vue-preview__loading-icon" />
</div>
</Transition>
</div>
Expand Down Expand Up @@ -222,6 +222,10 @@ const isHover = useElementHover(vuePreviewContainerRef)
background-color: var(--vue-preview-color-model-bg);
}
&__loading-icon {
color: var(--vue-preview-color-loading, black);
}
:deep(.editor) {
box-sizing: border-box;
overflow: hidden;
Expand Down
3 changes: 3 additions & 0 deletions test/vitepress/.vitepress/theme/base.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
:root {
--vue-preview-color-loading: rgba(0,255,0,0.8);
}
1 change: 1 addition & 0 deletions test/vitepress/.vitepress/theme/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import DefaultTheme from 'vitepress/theme'
import { VuePreview } from '../../../../dist'
import '../../../../dist/style.css'
import './base.css'

export default {
...DefaultTheme,
Expand Down

0 comments on commit 305c47c

Please sign in to comment.