Skip to content

Commit

Permalink
feat: add CvLink component
Browse files Browse the repository at this point in the history
CvLink component implementation covering all functionalities available at vue-carbon@2
  • Loading branch information
felipebritor committed Mar 20, 2023
1 parent 0042efc commit 2007b9b
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 0 deletions.
32 changes: 32 additions & 0 deletions src/components/CvLink/CvLink.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<template>
<component
:is="tagType"
v-bind="linkProps"
class="cv-link"
:class="[
`${carbonPrefix}--link`,
{
[`${carbonPrefix}--link--disabled`]: disabled,
[`${carbonPrefix}--link--inline`]: inline,
},
]"
>
<slot></slot>
</component>
</template>

<script setup>
import { carbonPrefix } from '../../global/settings';
import {
props as linkPropsDefinition,
useLinkProps,
useTagType,
} from '../../use/cvLink';
const props = defineProps({
inline: Boolean,
...linkPropsDefinition,
});
const linkProps = useLinkProps(props);
const tagType = useTagType(props);
</script>
4 changes: 4 additions & 0 deletions src/components/CvLink/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import CvLink from './CvLink.vue';

export { CvLink };
export default CvLink;

0 comments on commit 2007b9b

Please sign in to comment.