console/frontend: rename "darkMode" injected dependency to "theme"

This commit is contained in:
Vincent Bernat
2022-05-21 00:46:18 +02:00
parent 53c9d9277c
commit 407ad4c1bf
6 changed files with 19 additions and 21 deletions

View File

@@ -2,15 +2,15 @@
<button
type="button"
class="rounded-lg p-2.5 text-sm text-gray-500 hover:bg-gray-100 focus:outline-none focus:ring-4 focus:ring-gray-200 dark:text-gray-400 dark:hover:bg-gray-700 dark:focus:ring-gray-700"
@click="toggle()"
@click="toggleDark()"
>
<MoonIcon v-if="!isDark()" class="h-5 w-5" />
<SunIcon v-if="isDark()" class="h-5 w-5" />
<MoonIcon v-if="!isDark" class="h-5 w-5" />
<SunIcon v-if="isDark" class="h-5 w-5" />
</button>
</template>
<script setup>
import { inject } from "vue";
import { SunIcon, MoonIcon } from "@heroicons/vue/solid";
const { isDark, toggle } = inject("darkMode");
const { isDark, toggleDark } = inject("theme");
</script>