Skip to content

Commit

Permalink
feat(components/transition): 导出TransitionProps
Browse files Browse the repository at this point in the history
  • Loading branch information
mengxinssfd committed Jun 16, 2023
1 parent 8946038 commit 64f445e
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 9 deletions.
11 changes: 2 additions & 9 deletions packages/components/src/transition/Transition.tsx
Original file line number Diff line number Diff line change
@@ -1,15 +1,8 @@
import React, { memo } from 'react';
import { useDispatcher, useTransition } from './transition.hooks';
import type { Mode, CB } from './transition.types';
import type { TransitionProps } from './transition.types';

const Transition: React.FC<{
// show?: boolean;
name?: string;
mode?: Mode;
children?: React.ReactElement | boolean;
appear?: boolean;
on?: CB;
}> = ({
const Transition: React.FC<TransitionProps> = ({
children,
name = 'trans',
mode = 'default' /* , show */,
Expand Down
1 change: 1 addition & 0 deletions packages/components/src/transition/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
export type { TransitionProps, CB as TransitionCB } from './transition.types';
export { default as Transition } from './Transition';
export {
STATUS as TRANSITION_STATUS,
Expand Down
9 changes: 9 additions & 0 deletions packages/components/src/transition/transition.types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,12 @@ export type CB = (
status: STATUS,
lifeCircle: LIFE_CIRCLE,
) => void;

export interface TransitionProps {
// show?: boolean;
name?: string;
mode?: Mode;
children?: React.ReactElement | boolean;
appear?: boolean;
on?: CB;
}

0 comments on commit 64f445e

Please sign in to comment.