From 823c8fceddcb9a7e0cf021c1b122470cf58db4df Mon Sep 17 00:00:00 2001 From: Egor Date: Thu, 27 Apr 2023 18:04:21 +0300 Subject: [PATCH] fix: fixed display for one of (#33) --- .../kit/components/Inputs/OneOf/OneOf.scss | 22 +++++++++---------- src/lib/kit/components/Inputs/OneOf/OneOf.tsx | 2 +- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/lib/kit/components/Inputs/OneOf/OneOf.scss b/src/lib/kit/components/Inputs/OneOf/OneOf.scss index 1bb1db29..14535e4b 100644 --- a/src/lib/kit/components/Inputs/OneOf/OneOf.scss +++ b/src/lib/kit/components/Inputs/OneOf/OneOf.scss @@ -1,30 +1,22 @@ -@import '../../../styles/variables'; +@import '../../../styles/variables.scss'; .#{$ns}oneof { display: flex; - flex-direction: column-reverse; + flex-direction: column; &:last-child { & > .#{$ns}group-indent { margin-bottom: 0; - - &:empty + .#{$ns}oneof__toggler { - margin-bottom: 0; - } } } - &__toggler { - margin-bottom: 15px; - } - .#{$ns}group-indent { all: unset; & > .#{$ns}use-search { padding-top: 11px; padding-left: $normalOffset; - margin-top: -11px; + margin-top: 4px; margin-bottom: 20px; margin-left: 5px; border-left: 1px solid var(--yc-color-line-generic-accent); @@ -32,6 +24,14 @@ &:empty { display: none; } + + &:last-child { + margin-bottom: 0; + } + + & > .#{$ns}simple-vertical-accordeon_view { + margin-top: -10px; + } } } } diff --git a/src/lib/kit/components/Inputs/OneOf/OneOf.tsx b/src/lib/kit/components/Inputs/OneOf/OneOf.tsx index 338db945..48011a46 100644 --- a/src/lib/kit/components/Inputs/OneOf/OneOf.tsx +++ b/src/lib/kit/components/Inputs/OneOf/OneOf.tsx @@ -35,6 +35,7 @@ export const OneOf: ObjectIndependentInput = (props) => { return (
+
{toggler}
{specProperties[oneOfValue] ? ( { /> ) : null} -
{toggler}
); };