@dialpad/dialtone-vue
Version:
Vue component library for Dialpad's design system Dialtone
55 lines (54 loc) • 1.94 kB
JavaScript
;
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
const vue2 = require("@dialpad/dialtone-icons/vue2");
const unread_pill_constants = require("./unread_pill_constants.cjs");
const _pluginVue2_normalizer = require("../../../_virtual/_plugin-vue2_normalizer.cjs");
const _sfc_main = {
name: "DtRecipeUnreadPill",
components: {
DtIconArrowUp: vue2.DtIconArrowUp,
DtIconArrowDown: vue2.DtIconArrowDown
},
props: {
/**
* The kind of unread pill which determines the styling
* @values 'mentions', 'messages'
**/
kind: {
type: String,
required: true,
validator: (kind) => unread_pill_constants.UNREAD_PILL_KINDS.includes(kind)
},
/**
* The direction of the arrow icon
* @values 'up', 'down'
**/
direction: {
type: String,
required: true,
validator: (dir) => unread_pill_constants.UNREAD_PILL_DIRECTIONS.includes(dir)
}
},
emits: [
/**
* Native click event
*
* @event click
* @type {PointerEvent | KeyboardEvent}
*/
"click"
]
};
var _sfc_render = function render() {
var _vm = this, _c = _vm._self._c;
return _c("button", _vm._g({ class: ["d-recipe-leftbar-unread-pill", `d-recipe-leftbar-unread-pill-${_vm.kind}`], attrs: { "type": "button", "data-qa": "dt-recipe-leftbar-unread-pill" } }, _vm.$listeners), [_vm.direction === "up" ? _c("dt-icon-arrow-up", { attrs: { "size": "300" } }) : _c("dt-icon-arrow-down", { attrs: { "size": "300" } }), _c("span", { attrs: { "data-qa": "dt-recipe-leftbar-unread-pill__label" } }, [_vm._t("default")], 2)], 1);
};
var _sfc_staticRenderFns = [];
var __component__ = /* @__PURE__ */ _pluginVue2_normalizer.default(
_sfc_main,
_sfc_render,
_sfc_staticRenderFns
);
const unread_pill = __component__.exports;
exports.default = unread_pill;
//# sourceMappingURL=unread_pill.vue.cjs.map