Skip to content

Commit

Permalink
chore: schemaMatches
Browse files Browse the repository at this point in the history
add back schemaMatches + lint fixes
  • Loading branch information
seaerchin committed Jul 23, 2024
1 parent ab809e7 commit ab40c49
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
import type { ControlProps, RankedTester } from "@jsonforms/core"
import { Box, FormControl } from "@chakra-ui/react"
import { rankWith } from "@jsonforms/core"
import { rankWith, schemaMatches } from "@jsonforms/core"
import { withJsonFormsControlProps } from "@jsonforms/react"
import { FormLabel, Textarea } from "@opengovsg/design-system-react"

import { JSON_FORMS_RANKING } from "~/constants/formBuilder"

export const jsonFormsProseControlTester: RankedTester = rankWith(
JSON_FORMS_RANKING.ProseControl,
(_, schema) => {
schemaMatches((_, schema) => {
return schema.format === "prose"
},
}),
)

// TODO: Replace this with the Tiptap editor
Expand Down
3 changes: 1 addition & 2 deletions packages/components/src/interfaces/complex/Accordion.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import type { Static } from "@sinclair/typebox"
import { Type } from "@sinclair/typebox"
import { BaseProseSchema } from "../native/Prose"


import { BaseProseSchema } from "../native/Prose"

export const AccordionSchema = Type.Object(
{
Expand Down
2 changes: 1 addition & 1 deletion packages/components/src/interfaces/native/Prose.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ const generateProseSchema = (id?: string) => {
},
{
...(id && { $id: id }),
...BASE_PROSE_META
...BASE_PROSE_META,
},
)
}
Expand Down

0 comments on commit ab40c49

Please sign in to comment.