Skip to content

Commit

Permalink
Merge pull request #108 from the-control-group/update/accordion
Browse files Browse the repository at this point in the history
Update/accordion
  • Loading branch information
mehmetkoc182 authored Oct 28, 2019
2 parents 963ffc2 + ce88fd1 commit 86b8ebe
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
7 changes: 4 additions & 3 deletions src/elements/Accordion/Accordion.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,9 @@ class Accordion extends Component {
toggle: 'hide'
}, () => {
window.requestAnimationFrame(() => {
const transitionDuration = Math.max(this.accordionContent.current.clientHeight * 2, 300) > 5000 ?
5000 : Math.max(this.accordionContent.current.clientHeight * 2, 300);
const transitionDuration = Math.max(this.accordionContent.current.clientHeight, 300) > 5000
? 5000
: Math.max(this.accordionContent.current.clientHeight, 300);

// Set fixed height (based on height of content) and set transition-duration for .ui-accordion-content-wrapper.
// We need fixed height for CSS Transition to work and to animate slide down of accordion.
Expand Down Expand Up @@ -127,7 +128,7 @@ class Accordion extends Component {
showContent: false
});
this.disableToggle = false;
}, this.accordionContent.current.clientHeight * 2);
}, this.accordionContent.current.clientHeight);
});
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/elements/Modal/modal.less
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
@ui-modal-z-index: 99999;
@ui-modal-border-radius: 0;
@ui-modal-max-width: 43.75em; /* 700/16 */
@ui-modal-top: 7.5em;
@ui-modal-top: 2.5em;
@ui-modal-box-shadow: 2px 3px 9px -2px @ui-color-black;
@ui-modal-close-color: @ui-color-gray-darkest;
@ui-modal-overlay-background: @ui-color-black;
Expand Down

0 comments on commit 86b8ebe

Please sign in to comment.