mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Migrating Vue components to React and stores refactoring (#585)
Signed-off-by: Roman <ixrock@gmail.com> Co-authored-by: Sebastian Malton <sebastian@malton.name> Co-authored-by: Sebastian Malton <smalton@mirantis.com> Co-authored-by: Lauri Nevala <lauri.nevala@gmail.com> Co-authored-by: Alex Andreev <alex.andreev.email@gmail.com>
This commit is contained in:
297 files changed
+8186
-9103
No files matched your search
@@ -9,7 +9,6 @@ export type AnimateName = "opacity" | "slide-right" | "opacity-scale" | string;
|
||||
export interface AnimateProps {
|
||||
name?: AnimateName; // predefined names in css
|
||||
enter?: boolean;
|
||||
enabled?: boolean;
|
||||
onEnter?: () => void;
|
||||
onLeave?: () => void;
|
||||
}
|
||||
@@ -21,7 +20,6 @@ export class Animate extends React.Component<AnimateProps> {
|
||||
static defaultProps: AnimateProps = {
|
||||
name: "opacity",
|
||||
enter: true,
|
||||
enabled: true,
|
||||
onEnter: noop,
|
||||
onLeave: noop,
|
||||
};
|
||||
@@ -80,10 +78,7 @@ export class Animate extends React.Component<AnimateProps> {
|
||||
}
|
||||
|
||||
render() {
|
||||
const { name, enabled, children } = this.props;
|
||||
if (!enabled) {
|
||||
return children;
|
||||
}
|
||||
const { name } = this.props;
|
||||
const contentElem = this.contentElem;
|
||||
return React.cloneElement(contentElem, {
|
||||
className: cssNames("Animate", name, contentElem.props.className, this.statusClassName),
|
||||
|
||||
Reference in new issue
Block a user