aboutsummaryrefslogtreecommitdiff
path: root/src/ui/c-link/c-link.vue
diff options
context:
space:
mode:
authorGravatar Corentin Thomasset <corentin.thomasset74@gmail.com> 2023-04-23 22:26:32 +0200
committerGravatar Corentin THOMASSET <corentin.thomasset74@gmail.com> 2023-04-23 22:43:06 +0200
commit92bd83536fd1ca84e71d27c3682153cc8eb27d84 (patch)
tree55bca29e778aa67dbb9d59f052e20e8433b87169 /src/ui/c-link/c-link.vue
parente88c1d5f2c369e19b60af1f1d6424de74020dd2f (diff)
downloadit-tools-92bd83536fd1ca84e71d27c3682153cc8eb27d84.tar.gz
it-tools-92bd83536fd1ca84e71d27c3682153cc8eb27d84.tar.zst
it-tools-92bd83536fd1ca84e71d27c3682153cc8eb27d84.zip
feat(ui-lib): demo pages for c-lib components
Diffstat (limited to 'src/ui/c-link/c-link.vue')
-rw-r--r--src/ui/c-link/c-link.vue10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/ui/c-link/c-link.vue b/src/ui/c-link/c-link.vue
index df10120..a7d1b83 100644
--- a/src/ui/c-link/c-link.vue
+++ b/src/ui/c-link/c-link.vue
@@ -16,7 +16,15 @@ const props = defineProps<{
const { href, to } = toRefs(props);
const theme = useTheme();
-const tag = computed(() => (href?.value ? 'a' : RouterLink));
+const tag = computed(() => {
+ if (href?.value) {
+ return 'a';
+ }
+ if (to?.value) {
+ return RouterLink;
+ }
+ return 'span';
+});
</script>
<style lang="less" scoped>