@agilant/toga-blox 1.0.319-beta.87 → 1.0.319-beta.89
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
export const BooleanCell = ({ value }) => {
|
|
3
|
-
|
|
3
|
+
// The table accessorFn passes the raw value through, so a BOOLEAN field can
|
|
4
|
+
// arrive as an actual boolean, a tinyint (1/0), or a string — handle all.
|
|
5
|
+
const isTrue = value === true ||
|
|
6
|
+
value === 1 ||
|
|
7
|
+
value === "true" ||
|
|
8
|
+
value === "True" ||
|
|
9
|
+
value === "1";
|
|
4
10
|
return (_jsxs("div", { className: "flex items-center gap-2", children: [_jsx("span", { className: "size-2 rounded-full flex-shrink-0", style: { backgroundColor: isTrue ? "#2CB224" : "#FF2E54" } }), _jsx("span", { children: isTrue ? "Yes" : "No" })] }));
|
|
5
11
|
};
|
package/package.json
CHANGED