Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
71 changes: 21 additions & 50 deletions packages/core/src/SpeedDial/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ function Demo() {
children={[
{
icon: 'plus',
title: <Text>'Add'</Text>,
title: <Text>Add</Text>,
onPress:()=>console.log('Add')
},
{
Expand All @@ -47,57 +47,28 @@ function Demo() {
export default Demo
```

### Props

### SpeedDial Props
| 参数 | 说明 | 类型 | 默认值|
|------|------|-----|------|
| `icon` | 显示的图标 | `string` | `plus` \| `close` |
| `style` | 盒子样式 | `string` | - |
| `bottom` | 初始距离下边位置 | `number` | 350 |
| `right` | 初始距离右边位置 | `number` | 40 |
| `children` | 展开显示的标记 | Array<`SpeedDialItemProps`> | - |
| `isDrag` | 是否支持拖拽 | `boolean` | `false` |
| `transitionDuration` | 动画时间 | `number` | 200 |
| `onOpen` | 打开时触发 | Function | - |
| `onClose` | 关闭时触发 | Function | - |

```ts
import { ViewStyle,ViewProps } from 'react-native';
import { icoType,SpeedDialItemProps } from '@uiw/react-native';

export interface SpeedDialProps extends ViewProps {
/** 显示的图标 [默认显示, 展开显示] */
icon?: icoType,
/** 盒子样式 */
style?: ViewStyle,
/** 初始距离下边位置 */
bottom?: number, //
/** 初始距离右边位置 */
right?: number, //
/** 展开显示的标记 */
children?: Array<SpeedDialItemProps>,
/** 是否支持拖拽 */
isDrag?: boolean,
/** 动画时间 */
transitionDuration?: number,
/**
* 打开时触发
*/
onOpen?: Function,
/**
* 关闭时触发
*/
onClose?: Function,
}
```

### SpeedDialItemProps

### SpeedDialItem Props
| 参数 | 说明 | 类型 | 默认值|
|------|------|-----|------|
| `icon` | 右边显示的图标 | `string` | - |
| `title` | 左边文字 | `JSX.Element` \| `string` \| `number` | - |
| `titleStyle` | 左边文字盒子样式 | ViewStyle | - |
| `iconStyle` | 右边图标盒子样式 | ViewStyle | - |
| `onPress` | 点击右边时触发 | Function | - |

```ts
import { TabsItemIconTypes,IconsName } from '@uiw/react-native';

export interface SpeedDialItemProps {
/** 右边 显示的图标 */
icon: TabsItemIconTypes,
/** 左边文字 */
title: JSX.Element | string | number,
/** 左边文字盒子样式 */
titleStyle?: ViewStyle,
/** 右边图标盒子样式 */
iconStyle?: ViewStyle,
/**
* 点击右边时触发
*/
onPress?: Function,
}
```