committed by
Vladimír Gorej
parent
4ea28a9310
commit
f41c6ba0d7
@@ -52,12 +52,13 @@ const JSONSchema = ({ schema, name }) => {
|
||||
/**
|
||||
* Event handlers.
|
||||
*/
|
||||
const handleExpansion = useCallback(() => {
|
||||
setExpanded((prev) => !prev)
|
||||
const handleExpansion = useCallback((e, expandedNew) => {
|
||||
setExpanded(expandedNew)
|
||||
!expandedNew && setExpandedDeeply(false)
|
||||
}, [])
|
||||
const handleExpansionDeep = useCallback(() => {
|
||||
setExpanded((prev) => !prev)
|
||||
setExpandedDeeply((prev) => !prev)
|
||||
const handleExpansionDeep = useCallback((e, expandedDeepNew) => {
|
||||
setExpanded(expandedDeepNew)
|
||||
setExpandedDeeply(expandedDeepNew)
|
||||
}, [])
|
||||
|
||||
/**
|
||||
|
||||
@@ -18,8 +18,8 @@
|
||||
}
|
||||
|
||||
&-body {
|
||||
@include expansion-border;
|
||||
margin: 2px 0;
|
||||
border-left: 1px dashed rgba($section-models-model-container-background-color, 0.1);
|
||||
}
|
||||
|
||||
&__limit {
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
@mixin expansion-border {
|
||||
margin: 0 0 0 20px;
|
||||
border-left: 1px dashed rgba($section-models-model-container-background-color, 0.1);
|
||||
}
|
||||
|
||||
@import './JSONSchema/json-schema';
|
||||
@import './Accordion/accordion';
|
||||
@import './ExpandDeepButton/expand-deep-button';
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
.json-schema-2020-12 {
|
||||
&__\$defs {
|
||||
& ul {
|
||||
@include expansion-border;
|
||||
padding: 0;
|
||||
margin: 0 0 0 20px;
|
||||
border-left: 1px dashed rgba($section-models-model-container-background-color, 0.1);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
.json-schema-2020-12 {
|
||||
&__\$vocabulary {
|
||||
ul {
|
||||
margin: 0 0 0 20px;
|
||||
border-left: 1px dashed rgba($section-models-model-container-background-color, 0.1);
|
||||
@include expansion-border;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
.json-schema-2020-12 {
|
||||
&__allOf {
|
||||
& ul {
|
||||
margin: 5px 0 5px 0;
|
||||
|
||||
& > ul {
|
||||
@include expansion-border;
|
||||
padding: 0;
|
||||
margin: 0 0 0 20px;
|
||||
border-left: 1px dashed rgba($section-models-model-container-background-color, 0.1);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user