-
Notifications
You must be signed in to change notification settings - Fork 179
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CvLink component implementation covering all functionalities available at vue-carbon@2
- Loading branch information
1 parent
0042efc
commit 2007b9b
Showing
2 changed files
with
36 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
import CvLink from './CvLink.vue'; | ||
|
||
export { CvLink }; | ||
export default CvLink; |