@coko/client
Version:
Client side common code for coko apps
37 lines (36 loc) • 1.12 kB
JavaScript
import { lighten as e } from "../../toolkit/darkenLighten.js";
import { grid as t, th as n } from "../../toolkit/themeHelper.js";
import "../../toolkit/index.js";
import "react";
import r from "styled-components";
import { jsx as i } from "react/jsx-runtime";
//#region src/ui/common/Status.tsx
var a = r.span`
background-color: ${(t) => {
switch (t.$variant) {
case "Not Submitted": return e("colorBorder", .5);
case "Submitted": return n("colorText");
case "Rejected": return n("colorError");
case "Under Review": return n("colorWarning");
case "In Production": return n("colorPrimary");
case "Published": return n("colorSuccess");
default: return n("colorBackground");
}
}};
border-radius: 2px;
color: ${({ $variant: e }) => n(e === "Not Submitted" ? "colorTextDark" : "colorTextReverse")};
font-size: ${n("fontSizeBaseSmall")};
/* font-weight: bold; */
padding: ${t(1)} ${t(3)};
text-align: center;
`, o = (e) => {
let { className: t, status: n, ...r } = e;
return /* @__PURE__ */ i(a, {
$variant: n,
className: t,
...r,
children: n
});
};
//#endregion
export { o as default };