UNPKG

ant-design-x-vue-next

Version:

Ant Design X for Vue — community continuation aligned with @ant-design/x

66 lines (65 loc) 1.9 kB
import { defineComponent as r, mergeDefaults as s, computed as i, createVNode as l, mergeProps as m } from "vue"; import { c as f } from "../../../chunks/helper-chunk.mjs"; import { theme as p } from "ant-design-vue"; import I from "../ActionButton/index.mjs"; import { useActionButtonContextInject as g } from "../ActionButton/context.mjs"; import y from "./RecordingIcon.mjs"; import { A as b, M as h } from "../../../chunks/module-chunk.mjs"; const k = /* @__PURE__ */ r({ name: "AXSenderSpeechButton", __name: "index", props: s({ prefixCls: null, type: null, htmlType: null, shape: null, size: null, loading: null, disabled: null, ghost: null, block: null, danger: null, icon: null, href: null, target: null, title: null, onClick: null, onMousedown: null, audioIcon: null, audioDisabledIcon: null, audioRecordingIcon: null }, { type: "text", disabled: void 0, audioIcon: () => l(h, null, null), audioDisabledIcon: () => l(b, null, null), audioRecordingIcon: void 0 }), setup(e) { const t = f(e, ["type", "disabled", "audioIcon", "audioDisabledIcon", "audioRecordingIcon"]), o = g(), { token: u } = p.useToken(), d = i(() => o.value.speechRecording), c = i(() => o.value.prefixCls), a = i(() => { let n; return d.value ? n = e.audioRecordingIcon ? e.audioRecordingIcon : l(y, { className: `${c.value}-recording-icon` }, null) : o.value.onSpeechDisabled ? n = e.audioDisabledIcon : n = e.audioIcon, n; }); return () => l(I, m({ type: e.type, disabled: e.disabled }, t, { style: { display: "flex", justifyContent: "center", alignItems: "center", color: u.value.colorPrimary }, action: "onSpeech" }), { default: () => [a.value] }); } }); export { k as default };