@dialpad/dialtone
Version:
Dialpad's Dialtone design system monorepo
79 lines (78 loc) • 1.95 kB
JavaScript
;
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
const link_constants = require("./link_constants.cjs");
const _pluginVue2_normalizer = require("../../_virtual/_plugin-vue2_normalizer.cjs");
const _sfc_main = {
name: "DtLink",
props: {
/**
* Applies the link variant styles
* @values null, danger, warning, success, muted, mention
*/
kind: {
type: String,
default: "",
validator(kind) {
return link_constants.LINK_VARIANTS.includes(kind);
}
},
/**
* Determines whether the link should have inverted styling
* default is false.
* @values true, false
*/
inverted: {
type: Boolean,
default: false
}
},
emits: [
/**
* Native click event
*
* @event click
* @type {PointerEvent | KeyboardEvent}
*/
"click",
/**
* Native focus in event
*
* @event focusin
* @type {FocusEvent}
*/
"focusin",
/**
* Native focus out event
*
* @event focusout
* @type {FocusEvent}
*/
"focusout"
],
data() {
return {
LINK_KIND_MODIFIERS: link_constants.LINK_KIND_MODIFIERS
};
},
methods: {
getLinkClasses() {
return [
"d-link",
link_constants.getLinkKindModifier(this.kind, this.inverted)
];
}
}
};
var _sfc_render = function render() {
var _vm = this, _c = _vm._self._c;
return _c("a", _vm._g({ class: _vm.getLinkClasses(), attrs: { "data-qa": "dt-link", "href": "href" in _vm.$attrs ? _vm.$attrs.href : "javascript:void(0)" } }, _vm.$listeners), [_vm._t("default")], 2);
};
var _sfc_staticRenderFns = [];
var __component__ = /* @__PURE__ */ _pluginVue2_normalizer.default(
_sfc_main,
_sfc_render,
_sfc_staticRenderFns
);
const DtLink = __component__.exports;
exports.default = DtLink;
//# sourceMappingURL=link.vue.cjs.map