Skip to content

Commit

Permalink
fix: swipe item type error
Browse files Browse the repository at this point in the history
  • Loading branch information
3lang3 committed Jul 29, 2021
1 parent cf0707a commit ec90fda
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-vant",
"version": "0.0.21",
"version": "0.0.22",
"description": "React Mobile UI Components base on Vant UI",
"repository": "https://github.com/3lang3/react-vant.git",
"main": "lib/index.js",
Expand Down
4 changes: 2 additions & 2 deletions src/swipe/PropsType.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ForwardRefExoticComponent, RefAttributes } from 'react';
import { ForwardRefExoticComponent } from 'react';
import { BaseTypeProps } from '../utils';

export interface SwipeProps extends BaseTypeProps {
Expand All @@ -18,5 +18,5 @@ export interface SwipeProps extends BaseTypeProps {
}

export type SwipeStatic = {
Item?: ForwardRefExoticComponent<{ index: number }>;
Item: ForwardRefExoticComponent<{ index: number }>;
};
3 changes: 3 additions & 0 deletions src/swipe/Swipe.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import SwipeContext from './SwipeContext';
import { SwipeProps, SwipeStatic } from './PropsType';
import { doubleRaf } from '../utils/raf';
import { createNamespace, preventDefault, isHidden, range } from '../utils';
import SwipeItem from './SwipeItem';

const [bem] = createNamespace('swipe');

Expand Down Expand Up @@ -350,4 +351,6 @@ Swipe.defaultProps = {
stopPropagation: true,
};

Swipe.Item = SwipeItem;

export default Swipe;
3 changes: 0 additions & 3 deletions src/swipe/index.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
import Swipe from './Swipe';
import SwipeItem from './SwipeItem';

Swipe.Item = SwipeItem;

export default Swipe;

0 comments on commit ec90fda

Please sign in to comment.