Download data/web/src/components/FloatIconButton.vue from introvoyz045/CopilotJ: direct link, hf CLI and curl.
- Browser
- Download file 760 Bytes
-
https://huggingface.co/datasets/introvoyz045/CopilotJ/resolve/main/data/web/src/components/FloatIconButton.vue
- Command line
-
hf download hf://datasets/introvoyz045/CopilotJ/data/web/src/components/FloatIconButton.vue
-
curl -L -o FloatIconButton.vue https://huggingface.co/datasets/introvoyz045/CopilotJ/resolve/main/data/web/src/components/FloatIconButton.vue
760 Bytes
| <!-- | |
| SPDX-FileCopyrightText: Copyright contributors to the CopilotJ project. | |
| SPDX-License-Identifier: Apache-2.0 | |
| --> | |
| <script setup lang="ts"> | |
| import type { Icon } from "@tabler/icons-vue"; | |
| const props = withDefaults( | |
| defineProps<{ | |
| icon: Icon; | |
| disabled?: boolean; | |
| }>(), | |
| { disabled: false }, | |
| ); | |
| const emit = defineEmits<{ | |
| (e: "click"): void; | |
| }>(); | |
| function onClick() { | |
| if (props.disabled) return; | |
| emit("click"); | |
| } | |
| </script> | |
| <template> | |
| <div | |
| class="rounded-lg p-2 flex gap-4 transition-colors hover:bg-gray-200 dark:hover:bg-gray-800" | |
| :class="{ 'opacity-50 cursor-not-allowed': props.disabled, 'cursor-pointer': !props.disabled }" | |
| @click="onClick" | |
| > | |
| <component :is="props.icon" class="w-6 h-6" /> | |
| </div> | |
| </template> | |