-
Notifications
You must be signed in to change notification settings - Fork 143
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into feat/markdown-preview
- Loading branch information
Showing
7 changed files
with
112 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
create index on run using gin (input_text gin_trgm_ops); | ||
create index on run using gin (output_text gin_trgm_ops); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
import { | ||
ActionIcon, | ||
Box, | ||
Button, | ||
Modal, | ||
Text, | ||
Textarea, | ||
TextareaProps, | ||
Title, | ||
} from "@mantine/core" | ||
import { useDisclosure } from "@mantine/hooks" | ||
import { IconArrowsMaximize } from "@tabler/icons-react" | ||
|
||
type VariableTextareaProps = TextareaProps & { | ||
name: string | ||
value: string | ||
} | ||
|
||
export default function VariableTextarea({ | ||
name, | ||
value, | ||
onChange, | ||
...props | ||
}: VariableTextareaProps) { | ||
const [opened, { open, close }] = useDisclosure(false) | ||
|
||
return ( | ||
<> | ||
<Modal | ||
opened={opened} | ||
onClose={close} | ||
title={<Title order={3}>Edit variable</Title>} | ||
overlayProps={{ | ||
backgroundOpacity: 0.55, | ||
blur: 3, | ||
}} | ||
size="xl" | ||
> | ||
<Textarea | ||
size="md" | ||
radius="sm" | ||
minRows={2} | ||
rows={10} | ||
autosize | ||
value={value} | ||
onChange={onChange} | ||
/> | ||
|
||
<Button my="md" style={{ float: "right" }} onClick={close}> | ||
Save | ||
</Button> | ||
</Modal> | ||
|
||
<Box style={{ position: "relative" }}> | ||
<Textarea {...props} onChange={onChange} value={value} /> | ||
<ActionIcon | ||
size="xs" | ||
onClick={open} | ||
aria-label="expand textarea" | ||
variant="transparent" | ||
style={{ | ||
position: "absolute", | ||
right: "5%", | ||
bottom: "5%", | ||
marginBottom: "0.3rem", | ||
}} | ||
> | ||
<IconArrowsMaximize /> | ||
</ActionIcon> | ||
</Box> | ||
</> | ||
) | ||
} |