fix:样式fieSet、image、collapse (#2856)

Co-authored-by: dqc <qianchuan.deng@gmail.com>
This commit is contained in:
qianchuan 2021-11-04 18:06:12 +08:00 committed by GitHub
parent 6d40875b67
commit 4188a8e0f2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 31 additions and 4 deletions

View File

@ -39,6 +39,10 @@
} }
} }
&-TplField {
display: inline-block;
}
&.is-collapsed &-arrow:before { &.is-collapsed &-arrow:before {
transform: rotate(45deg); transform: rotate(45deg);
transform-origin: 0% 50%; transform-origin: 0% 50%;

View File

@ -21,6 +21,7 @@
&-thumbWrap { &-thumbWrap {
position: relative; position: relative;
height: 100%;
} }
&-image { &-image {

View File

@ -44,8 +44,7 @@ fieldset.#{$ns}Collapse {
border-bottom: 0; border-bottom: 0;
display: flex; display: flex;
flex-direction: row; flex-direction: row;
justify-content: space-between; // width: 100%;
width: 100%;
} }
&--xs { &--xs {

View File

@ -127,7 +127,7 @@
.#{$ns}InputGroup-btn .#{$ns}Button { .#{$ns}InputGroup-btn .#{$ns}Button {
border-radius: px2rem(3px); border-radius: px2rem(3px);
} }
.#{$ns}InputGroup-btn:last-child .#{$ns}Button { .#{$ns}InputGroup-btn:last-child .#{$ns}Button {
border-top-left-radius: 0; border-top-left-radius: 0;
border-bottom-left-radius: 0; border-bottom-left-radius: 0;
@ -338,3 +338,23 @@
} }
} }
} }
//FieldSet Form + Collapse
.#{$ns}Form {
.#{$ns}Collapse {
border: none;
&-arrow {
margin-left: px2rem(8px);
}
&-header {
background-color: var(--white);
display: inline-flex;
justify-content: flex-end;
flex-direction: row-reverse;
}
&-content {
padding: 0;
}
}
}

View File

@ -101,7 +101,10 @@ export class Collapse extends React.Component<CollapseProps, any> {
this.contentDom.offsetWidth; this.contentDom.offsetWidth;
} }
return ( return (
<div className={cx('Collapse-contentWrapper', collapseStyles[status])} ref={this.contentRef}> <div
className={cx('Collapse-contentWrapper', collapseStyles[status])}
ref={this.contentRef}
>
{React.cloneElement(children as any, { {React.cloneElement(children as any, {
...(children as React.ReactElement).props, ...(children as React.ReactElement).props,
className: cx( className: cx(