UNPKG

@progress/kendo-react-upload

Version:

React Upload component helps users transfer files from their file systems to dedicated server handlers. KendoReact Upload package

25 lines (24 loc) 1.41 kB
/** * @license *------------------------------------------------------------------------------------------- * Copyright © 2025 Progress Software Corporation. All rights reserved. * Licensed under commercial license. See LICENSE.md in the package root for more information *------------------------------------------------------------------------------------------- */ import * as i from "react"; import { classNames as d, IconWrap as u } from "@progress/kendo-react-common"; import { provideLocalizationService as g, registerForLocalization as f } from "@progress/kendo-react-intl"; import { headerStatusUploading as c, messages as n, headerStatusUploaded as r } from "./messages/index.mjs"; import { checkIcon as S, exclamationCircleIcon as h, uploadIcon as U } from "@progress/kendo-svg-icons"; class v extends i.Component { render() { const { isUploading: e, isUploaded: a, isUploadFailed: o } = this.props, l = d("k-upload-status"), m = !e && !o && a ? "check" : !e && o ? "exclamation-circle" : e ? "upload" : "", p = !e && !o && a ? { icon: S } : !e && o ? { icon: h } : e ? { icon: U } : {}; let t = ""; const s = g(this); return e ? t = s.toLanguageString(c, n[c]) : (a || o) && (t = s.toLanguageString(r, n[r])), /* @__PURE__ */ i.createElement("div", { className: l }, /* @__PURE__ */ i.createElement(u, { name: m, ...p }), t); } } f(v); export { v as UploadStatus };