UNPKG

@frontify/fondue

Version:
30 lines (29 loc) 1.54 kB
import { jsxs as r, jsx as l, Fragment as c } from "react/jsx-runtime"; import a from "../../../foundation/Icon/Generated/IconArrowCircleUp.es.js"; import m from "../../../foundation/Icon/Generated/IconImageStack.es.js"; const d = ({ asset: e, isLoading: t = !1, hideSize: o = !1, hideExtension: w = !1 }) => { let n = t ? "Uploading" : "Uploaded"; return (e == null ? void 0 : e.source) === "library" && (n = e.sourceName), /* @__PURE__ */ r("span", { className: "tw-max-w-full tw-flex tw-flex-row tw-items-center tw-gap-1 tw-text-black-80 tw-text-xxs tw-overflow-hidden", children: [ /* @__PURE__ */ l("div", { className: "tw-flex-none tw-inline-flex tw-items-center tw-justify-center", children: (e == null ? void 0 : e.source) === "library" ? /* @__PURE__ */ l(m, {}) : /* @__PURE__ */ l(a, {}) }), n && /* @__PURE__ */ l("span", { className: "tw-whitespace-nowrap", children: n }), e && !t && /* @__PURE__ */ r(c, { children: [ /* @__PURE__ */ l(i, { label: e.extension, hide: w }), /* @__PURE__ */ l(i, { label: e.size, hide: o }) ] }) ] }); }; d.displayName = "FondueAssetSubline"; const i = ({ label: e, hide: t }) => t || !e ? null : /* @__PURE__ */ r(c, { children: [ /* @__PURE__ */ l("span", { className: "tw-text-m tw-text-black-20 tw-h-4 tw-flex tw-items-center", children: "•" }), /* @__PURE__ */ l("span", { className: "tw-whitespace-nowrap", children: e }) ] }); i.displayName = "FondueFileInfo"; export { d as AssetSubline }; //# sourceMappingURL=AssetSubline.es.js.map