|
1 | 1 | import React, {Component} from 'react'; |
2 | | -import {StyleSheet, View, Text} from 'react-native'; |
| 2 | +import {StyleSheet, View, Text, Dimensions} from 'react-native'; |
3 | 3 | import Layout, {Container} from '../../Layout'; |
4 | 4 | import {SpeedDial, Icon, IconsName} from '@uiw/react-native'; |
5 | 5 | import {ComProps} from '../../routes'; |
6 | 6 |
|
| 7 | +let MainHeight = Dimensions.get('window').height; |
| 8 | + |
7 | 9 | const {Header, Body, Card, Footer} = Layout; |
8 | 10 |
|
9 | 11 | export interface listItem { |
@@ -32,29 +34,32 @@ export default class Index extends Component<IndexProps, IndexState> { |
32 | 34 | <Layout> |
33 | 35 | <Header title={title} description={description} /> |
34 | 36 | <Body scrollEnabled={false}> |
35 | | - <SpeedDial |
36 | | - icon={['star-on', 'star-off']} |
37 | | - isDrag={true} |
38 | | - children={[ |
39 | | - { |
40 | | - icon: <Icon name="plus" color="#fff" size={18} />, |
41 | | - title: <Text>'Add'</Text>, |
42 | | - onPress: () => console.log('Add'), |
43 | | - }, |
44 | | - { |
45 | | - icon: <Icon name="star-on" color="#fff" size={18} />, |
46 | | - title: 'Star', |
47 | | - }, |
48 | | - { |
49 | | - icon: <Icon name="mail" color="#fff" size={18} />, |
50 | | - title: 'Mail-asdlfslasdkfsdklajfsadf', |
51 | | - }, |
52 | | - { |
53 | | - icon: <Icon name="share" color="#fff" size={18} />, |
54 | | - title: 'Share', |
55 | | - }, |
56 | | - ]} |
57 | | - /> |
| 37 | + <View style={{height: MainHeight}}> |
| 38 | + <SpeedDial |
| 39 | + bottom={MainHeight / 2 + 100} |
| 40 | + icon={['star-on', 'star-off']} |
| 41 | + isDrag={true} |
| 42 | + children={[ |
| 43 | + { |
| 44 | + icon: <Icon name="plus" color="#fff" size={18} />, |
| 45 | + title: <Text>'Add'</Text>, |
| 46 | + onPress: () => console.log('Add'), |
| 47 | + }, |
| 48 | + { |
| 49 | + icon: <Icon name="star-on" color="#fff" size={18} />, |
| 50 | + title: 'Star', |
| 51 | + }, |
| 52 | + { |
| 53 | + icon: <Icon name="mail" color="#fff" size={18} />, |
| 54 | + title: 'Mail-asdlfslasdkfsdklajfsadf', |
| 55 | + }, |
| 56 | + { |
| 57 | + icon: <Icon name="share" color="#fff" size={18} />, |
| 58 | + title: 'Share', |
| 59 | + }, |
| 60 | + ]} |
| 61 | + /> |
| 62 | + </View> |
58 | 63 | </Body> |
59 | 64 | <Footer /> |
60 | 65 | </Layout> |
|
0 commit comments