Skip to content

Commit d121b68

Browse files
committed
docs: fix motion
1 parent 5c3e907 commit d121b68

2 files changed

Lines changed: 24 additions & 4 deletions

File tree

docs/examples/list.less

Lines changed: 23 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
@import './basic.less';
1+
// @import './basic.less';
22

33
.list-demo-block {
44
position: relative;
@@ -19,6 +19,26 @@
1919
}
2020
}
2121

22-
.transition {
23-
transition: all 0.5s;
22+
.list-transition {
23+
&-appear,
24+
&-enter {
25+
&-start {
26+
width: 0;
27+
opacity: 0;
28+
}
29+
30+
&-active {
31+
width: 100px;
32+
opacity: 1;
33+
transition: all 0.5s;
34+
}
35+
}
36+
37+
&-leave {
38+
&-active {
39+
width: 0;
40+
opacity: 0;
41+
transition: all 0.5s;
42+
}
43+
}
2444
}

docs/examples/list.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ class App extends React.Component<{}, DemoState> {
9393
{/* Motion List */}
9494
<CSSMotionList
9595
keys={keyList}
96-
motionName="transition"
96+
motionName="list-transition"
9797
onAppearStart={this.onCollapse}
9898
onEnterStart={this.onCollapse}
9999
onLeaveActive={this.onCollapse}

0 commit comments

Comments
 (0)