UNPKG

@dialpad/dialtone

Version:

Dialpad's Dialtone design system monorepo

55 lines (54 loc) 1.76 kB
import { DtIconArrowUp, DtIconArrowDown } from "@dialpad/dialtone-icons/vue2"; import { UNREAD_PILL_KINDS, UNREAD_PILL_DIRECTIONS } from "./unread_pill_constants.js"; import normalizeComponent from "../../../_virtual/_plugin-vue2_normalizer.js"; const _sfc_main = { name: "DtRecipeUnreadPill", components: { DtIconArrowUp, DtIconArrowDown }, props: { /** * The kind of unread pill which determines the styling * @values 'mentions', 'messages' **/ kind: { type: String, required: true, validator: (kind) => UNREAD_PILL_KINDS.includes(kind) }, /** * The direction of the arrow icon * @values 'up', 'down' **/ direction: { type: String, required: true, validator: (dir) => 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__ */ normalizeComponent( _sfc_main, _sfc_render, _sfc_staticRenderFns ); const unread_pill = __component__.exports; export { unread_pill as default }; //# sourceMappingURL=unread_pill.vue.js.map