@coreui/vue
Version:
UI Components Library for Vue.js
44 lines (40 loc) • 1.03 kB
JavaScript
'use strict';
var vue = require('vue');
var CLink = require('../link/CLink.js');
const CNavLink = vue.defineComponent({
name: 'CNavLink',
props: {
/**
* Toggle the active state for the component.
*/
active: Boolean,
/**
* Component used for the root node. Either a string to use a HTML element or a component.
*/
as: {
type: String,
default: 'a',
},
/**
* Toggle the disabled state for the component.
*/
disabled: Boolean,
/**
* @ignore
*/
href: String,
},
setup(props, { slots }) {
return () => vue.h(CLink.CLink, {
as: props.as,
active: props.active,
class: 'nav-link',
disabled: props.disabled,
href: props.href,
}, {
default: () => slots.default && slots.default(),
});
},
});
exports.CNavLink = CNavLink;
//# sourceMappingURL=CNavLink.js.map