mirror of
https://github.com/prymitive/karma
synced 2026-05-21 04:33:07 +00:00
fix(ui): fix grid animations
Fade on mount wasn't working because it was placed at the wrong level. Animate group moves around the grid.
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
.components-animation-fade-appear-active,
|
||||
.components-animation-fade-enter-active {
|
||||
opacity: 1;
|
||||
transition: opacity 0.15s ease-in;
|
||||
transition: all 0.3s ease-in;
|
||||
}
|
||||
|
||||
.components-animation-fade-exit {
|
||||
@@ -13,5 +13,5 @@
|
||||
}
|
||||
.components-animation-fade-exit-active {
|
||||
opacity: 0.01;
|
||||
transition: opacity 0.15s ease-out;
|
||||
transition: all 0.3s ease-out;
|
||||
}
|
||||
|
||||
@@ -8,7 +8,7 @@ import "./index.css";
|
||||
const MountFade = ({ children, duration, ...props }) => (
|
||||
<CSSTransition
|
||||
classNames="components-animation-fade"
|
||||
timeout={150}
|
||||
timeout={300}
|
||||
appear={true}
|
||||
enter={true}
|
||||
exit={true}
|
||||
|
||||
@@ -177,11 +177,8 @@ const AlertGroup = observer(
|
||||
}
|
||||
|
||||
return (
|
||||
<MountFade>
|
||||
<div
|
||||
className="components-grid-alertgrid-alertgroup p-1"
|
||||
style={style}
|
||||
>
|
||||
<div className="components-grid-alertgrid-alertgroup p-1" style={style}>
|
||||
<MountFade in={true}>
|
||||
<div className="card">
|
||||
<GroupHeader
|
||||
collapseStore={this.collapse}
|
||||
@@ -240,8 +237,8 @@ const AlertGroup = observer(
|
||||
/>
|
||||
) : null}
|
||||
</div>
|
||||
</div>
|
||||
</MountFade>
|
||||
</MountFade>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
5
ui/src/Components/Grid/AlertGrid/index.css
Normal file
5
ui/src/Components/Grid/AlertGrid/index.css
Normal file
@@ -0,0 +1,5 @@
|
||||
.components-grid-alertgrid-alertgroup {
|
||||
transition-property: top, left;
|
||||
transition-duration: 0.3s;
|
||||
transition-timing-function: ease;
|
||||
}
|
||||
@@ -23,6 +23,8 @@ import { SilenceFormStore } from "Stores/SilenceFormStore";
|
||||
import { AlertGroup } from "./AlertGroup";
|
||||
import { GridSizesConfig, GetGridElementWidth } from "./Constants";
|
||||
|
||||
import "./index.css";
|
||||
|
||||
const AlertGrid = observer(
|
||||
class AlertGrid extends Component {
|
||||
static propTypes = {
|
||||
|
||||
Reference in New Issue
Block a user