@dialpad/dialtone-vue
Version:
Vue component library for Dialpad's design system Dialtone
77 lines (76 loc) • 1.59 kB
JavaScript
import { getLinkKindModifier as r, LINK_KIND_MODIFIERS as s, LINK_VARIANTS as i } from "./link-constants.js";
import { n as a } from "../../_plugin-vue2_normalizer-DSLOjnn3.js";
const o = {
name: "DtLink",
props: {
/**
* Applies the link variant styles
* @values null, danger, warning, success, muted, mention
*/
kind: {
type: String,
default: "",
validator(e) {
return i.includes(e);
}
},
/**
* Determines whether the link should have inverted styling
* default is false.
* @values true, false
*/
inverted: {
type: Boolean,
default: !1
}
},
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: s
};
},
methods: {
getLinkClasses() {
return [
"d-link",
r(this.kind, this.inverted)
];
}
}
};
var d = function() {
var t = this, n = t._self._c;
return n("a", t._g({ class: t.getLinkClasses(), attrs: { "data-qa": "dt-link", href: "href" in t.$attrs ? t.$attrs.href : "javascript:void(0)" } }, t.$listeners), [t._t("default")], 2);
}, _ = [], f = /* @__PURE__ */ a(
o,
d,
_
);
const u = f.exports;
export {
u as default
};
//# sourceMappingURL=link.js.map