GitHubStarButton.vue 731 B

123456789101112131415161718192021222324252627282930313233
  1. <template>
  2. <transition name="fade" appear>
  3. <GithubButton
  4. title="Star Hoppscotch"
  5. href="https://github.com/hoppscotch/hoppscotch"
  6. :data-color-scheme="
  7. colorMode.value != 'light'
  8. ? colorMode.value == 'black'
  9. ? 'dark'
  10. : 'dark_dimmed'
  11. : 'light'
  12. "
  13. :data-show-count="true"
  14. data-text="Star"
  15. aria-label="Star Hoppscotch on GitHub"
  16. :data-size="size"
  17. />
  18. </transition>
  19. </template>
  20. <script setup lang="ts">
  21. import GithubButton from "vue-github-button"
  22. import { useColorMode } from "~/helpers/utils/composables"
  23. const colorMode = useColorMode()
  24. defineProps({
  25. size: {
  26. type: String,
  27. default: undefined,
  28. },
  29. })
  30. </script>