diff --git a/public/app/core/components/Animations/SlideDown.tsx b/public/app/core/components/Animations/SlideDown.tsx index 4d515f98f16..497af02ade9 100644 --- a/public/app/core/components/Animations/SlideDown.tsx +++ b/public/app/core/components/Animations/SlideDown.tsx @@ -1,15 +1,20 @@ import React from 'react'; import Transition from 'react-transition-group/Transition'; +interface Style { + transition?: string; + overflow?: string; +} + const defaultMaxHeight = '200px'; // When animating using max-height we need to use a static value. // If this is not enough, pass in - + {!isAdding && ( + + )} {this.renderAddApiKeyForm()} ); @@ -127,9 +130,10 @@ export class ApiKeysPage extends PureComponent { renderAddApiKeyForm() { const { newApiKey, isAdding } = this.state; + const slideDownStyle = isAdding ? slideDownDefaultStyle : { ...slideDownDefaultStyle, transition: 'unset' }; return ( - +
`; -exports[`Render should render CTA if theres are no API keys 1`] = ` +exports[`Render should render CTA if there are no API keys 1`] = `