File tree Expand file tree Collapse file tree 1 file changed +40
-1
lines changed
packages/core/src/SpeedDial Expand file tree Collapse file tree 1 file changed +40
-1
lines changed Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ function Demo() {
1919 return (
2020 < View style= {{ height: 800 , background: ' #ddd' }}>
2121 < SpeedDial
22- onOpen= {()=> console .log (' onOpen ' )}
22+ onOpen= {()=> console .log (' onOpen2 ' )}
2323 onClose= {()=> console .log (' onClose' )}
2424 children= {[
2525 {
@@ -47,6 +47,45 @@ function Demo() {
4747export default Demo
4848```
4949
50+ ### 设置动画时间
51+
52+ ``` jsx mdx:preview
53+ import React , { Fragment } from ' react' ;
54+ import { SpeedDial , Icon } from ' @uiw/react-native' ;
55+ import { View , Text , Dimensions } from ' react-native' ;
56+
57+ function Demo () {
58+ return (
59+ < View style= {{ height: 800 , background: ' #ddd' }}>
60+ < SpeedDial
61+ transitionDuration= {2000 }
62+ onOpen= {()=> console .log (' onOpen' )}
63+ onClose= {()=> console .log (' onClose' )}
64+ children= {[
65+ {
66+ icon: ' plus' ,
67+ title: < Text > Add< / Text > ,
68+ onPress : ()=> console .log (' Add' )
69+ },
70+ {
71+ icon: < Icon name= ' star-on' color= " #fff" size= {18 } / > ,
72+ title: ' Star'
73+ },
74+ {
75+ icon: < Icon name= ' mail' color= " #fff" size= {18 } / > ,
76+ title: ' Mail'
77+ },
78+ {
79+ icon: < Icon name= ' share' color= " #fff" size= {18 } / > ,
80+ title: ' Share'
81+ }
82+ ]}
83+ / >
84+ < / View>
85+ );
86+ }
87+ export default Demo
88+ ```
5089### Props
5190
5291| 参数 | 说明 | 类型 | 默认值|
You can’t perform that action at this time.
0 commit comments