mirror of
https://github.com/docmost/docmost.git
synced 2026-08-29 01:37:05 +08:00
feat(base): tighten formula editor spacing and pill styling
This commit is contained in:
@@ -93,13 +93,13 @@ export function FormulaEditor({
|
|||||||
)}
|
)}
|
||||||
</Group>
|
</Group>
|
||||||
|
|
||||||
<Stack gap={8} px="md" py="sm">
|
<Stack gap={6} px={14} pt={10} pb={8}>
|
||||||
<FormulaInput
|
<FormulaInput
|
||||||
value={source}
|
value={source}
|
||||||
onChange={setSource}
|
onChange={setSource}
|
||||||
hasError={parseState.state === "error"}
|
hasError={parseState.state === "error"}
|
||||||
/>
|
/>
|
||||||
<Group justify="space-between" gap={8} mih={18}>
|
<Group justify="space-between" gap={8} mih={16}>
|
||||||
{parseState.state === "error" ? (
|
{parseState.state === "error" ? (
|
||||||
<Group gap={6} c="red.7">
|
<Group gap={6} c="red.7">
|
||||||
<IconAlertTriangle size={12} />
|
<IconAlertTriangle size={12} />
|
||||||
@@ -125,7 +125,7 @@ export function FormulaEditor({
|
|||||||
|
|
||||||
<Divider />
|
<Divider />
|
||||||
|
|
||||||
<Stack gap={10} px="md" py="sm">
|
<Stack gap={8} px={14} pt={10} pb={10}>
|
||||||
<PropertyChipRow
|
<PropertyChipRow
|
||||||
properties={properties.filter((p) => p.id !== editingPropertyId)}
|
properties={properties.filter((p) => p.id !== editingPropertyId)}
|
||||||
onInsert={(name) => insertAtEnd(`prop("${name}")`)}
|
onInsert={(name) => insertAtEnd(`prop("${name}")`)}
|
||||||
@@ -134,7 +134,7 @@ export function FormulaEditor({
|
|||||||
|
|
||||||
<Divider />
|
<Divider />
|
||||||
|
|
||||||
<Stack gap={8} px="md" py="sm">
|
<Stack gap={6} px={14} pt={10} pb={10}>
|
||||||
<Text size="xs" fw={600} c="gray.7">
|
<Text size="xs" fw={600} c="gray.7">
|
||||||
Functions
|
Functions
|
||||||
</Text>
|
</Text>
|
||||||
|
|||||||
@@ -31,11 +31,18 @@ export function FunctionPalette({
|
|||||||
onChange={setOpen}
|
onChange={setOpen}
|
||||||
variant="contained"
|
variant="contained"
|
||||||
radius="md"
|
radius="md"
|
||||||
|
chevronSize={14}
|
||||||
styles={{
|
styles={{
|
||||||
item: { borderColor: "var(--mantine-color-gray-3)" },
|
item: { borderColor: "var(--mantine-color-gray-2)" },
|
||||||
control: { padding: "9px 12px" },
|
control: { padding: "7px 12px", minHeight: 0 },
|
||||||
label: { fontSize: 13, fontWeight: 500, textTransform: "capitalize" },
|
label: {
|
||||||
content: { padding: "8px 10px 12px" },
|
padding: 0,
|
||||||
|
fontSize: 13,
|
||||||
|
fontWeight: 600,
|
||||||
|
textTransform: "capitalize",
|
||||||
|
},
|
||||||
|
content: { padding: "6px 10px 10px" },
|
||||||
|
panel: { background: "var(--mantine-color-gray-0)" },
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{CATEGORIES.map((cat) => {
|
{CATEGORIES.map((cat) => {
|
||||||
@@ -59,8 +66,8 @@ export function FunctionPalette({
|
|||||||
style={{
|
style={{
|
||||||
display: "inline-flex",
|
display: "inline-flex",
|
||||||
alignItems: "center",
|
alignItems: "center",
|
||||||
gap: 3,
|
gap: 4,
|
||||||
padding: "3px 9px",
|
padding: "4px 10px",
|
||||||
borderRadius: 5,
|
borderRadius: 5,
|
||||||
fontFamily:
|
fontFamily:
|
||||||
"ui-monospace, SFMono-Regular, Menlo, 'JetBrains Mono', monospace",
|
"ui-monospace, SFMono-Regular, Menlo, 'JetBrains Mono', monospace",
|
||||||
|
|||||||
Reference in New Issue
Block a user