Skip to content

Commit

Permalink
chore(sfc-playground): adjust the tooltip text for toggling the theme (
Browse files Browse the repository at this point in the history
…#12116)

* chore(sfc-playground): adjust the tooltip text for toggling the theme

* [autofix.ci] apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
  • Loading branch information
w2xi and autofix-ci[bot] authored Oct 11, 2024
1 parent 704173e commit e0a591e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
1 change: 1 addition & 0 deletions packages-private/sfc-playground/src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ onMounted(() => {
:prod="productionMode"
:ssr="useSSRMode"
:autoSave="autoSave"
:theme="theme"
@toggle-theme="toggleTheme"
@toggle-prod="toggleProdMode"
@toggle-ssr="toggleSSR"
Expand Down
7 changes: 6 additions & 1 deletion packages-private/sfc-playground/src/Header.vue
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ const props = defineProps<{
prod: boolean
ssr: boolean
autoSave: boolean
theme: 'dark' | 'light'
}>()
const emit = defineEmits([
'toggle-theme',
Expand Down Expand Up @@ -117,7 +118,11 @@ function toggleDark() {
>
<span>{{ autoSave ? 'AutoSave ON' : 'AutoSave OFF' }}</span>
</button>
<button title="Toggle dark mode" class="toggle-dark" @click="toggleDark">
<button
:title="`Switch to ${theme === 'dark' ? 'light' : 'dark'} theme`"
class="toggle-dark"
@click="toggleDark"
>
<Sun class="light" />
<Moon class="dark" />
</button>
Expand Down

0 comments on commit e0a591e

Please sign in to comment.