UNPKG

@udus/notion-renderer

Version:
8 lines (7 loc) 699 B
import { jsx as _jsx } from "react/jsx-runtime"; import { Checkbox } from "../Common/Checkbox.js"; import { DateComponent } from "../Common/Date.js"; export const FormulaProperty = ({ propertyItem, format, }) => { const { formula } = propertyItem; return (_jsx("div", { id: propertyItem.id, className: "notion-property-item notion-formula", children: formula.type === "string" ? (_jsx("span", { children: formula.string })) : formula.type === "number" ? (_jsx("span", { children: formula.number })) : formula.type === "boolean" ? (_jsx(Checkbox, { checked: formula.boolean ?? false })) : formula.type === "date" ? (_jsx(DateComponent, { date: formula.date, format: format })) : null })); };