@dialpad/dialtone
Version:
Dialpad's Dialtone design system monorepo
57 lines (56 loc) • 1.33 kB
JavaScript
import { getLinkKindModifier as r, LINK_KIND_MODIFIERS as n, LINK_VARIANTS as a } from "./link-constants.js";
import { createElementBlock as s, openBlock as i, normalizeClass as o, renderSlot as d } from "vue";
import { _ as l } from "../../_plugin-vue_export-helper-CHgC5LLL.js";
const f = {
compatConfig: { MODE: 3 },
name: "DtLink",
props: {
/**
* Applies the link variant styles
* @values null, danger, warning, success, muted, mention
*/
kind: {
type: String,
default: "",
validator(e) {
return a.includes(e);
}
},
/**
* Determines whether the link should have inverted styling
* default is false.
* @values true, false
*/
inverted: {
type: Boolean,
default: !1
}
},
data() {
return {
LINK_KIND_MODIFIERS: n
};
},
methods: {
getLinkClasses() {
return [
"d-link",
r(this.kind, this.inverted)
];
}
}
}, p = ["href"];
function c(e, m, k, u, _, t) {
return i(), s("a", {
class: o(t.getLinkClasses()),
"data-qa": "dt-link",
href: "href" in e.$attrs ? e.$attrs.href : "javascript:void(0)"
}, [
d(e.$slots, "default")
], 10, p);
}
const $ = /* @__PURE__ */ l(f, [["render", c]]);
export {
$ as default
};
//# sourceMappingURL=link.js.map