feat(json-schema-2020-12): detect expandable behavior

Refs #8513
This commit is contained in:
Vladimir Gorej
2023-04-19 09:40:59 +02:00
committed by Vladimír Gorej
parent e517397fd2
commit fe181ede90
7 changed files with 48 additions and 17 deletions

View File

@@ -13,7 +13,13 @@ import Accordion from "./components/Accordion/Accordion"
import ExpandDeepButton from "./components/ExpandDeepButton/ExpandDeepButton"
import ChevronRightIcon from "./components/icons/ChevronRight"
import { JSONSchemaContext } from "./context"
import { getTitle, isBooleanJSONSchema, upperFirst, getType } from "./fn"
import {
getTitle,
isBooleanJSONSchema,
upperFirst,
getType,
isExpandable,
} from "./fn"
export const withJSONSchemaContext = (Component, overrides = {}) => {
const value = {
@@ -38,6 +44,7 @@ export const withJSONSchemaContext = (Component, overrides = {}) => {
getTitle,
getType,
isBooleanJSONSchema,
isExpandable,
...overrides.fn,
},
}