diff --git a/packages/core/src/SpeedDial/README.md b/packages/core/src/SpeedDial/README.md index 4419a070f..d90aca271 100644 --- a/packages/core/src/SpeedDial/README.md +++ b/packages/core/src/SpeedDial/README.md @@ -24,7 +24,7 @@ function Demo() { children={[ { icon: 'plus', - title: 'Add', + title: Add, onPress:()=>console.log('Add') }, { @@ -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, - /** 是否支持拖拽 */ - 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, -} -```