Skip to content

Commit

Permalink
feat: 移除Render props的支持
Browse files Browse the repository at this point in the history
  • Loading branch information
IVLIU committed Jan 20, 2025
1 parent 4071f60 commit ac8462b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/Repeater.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,5 +40,5 @@ export const Repeater: FC<IProps> = (props) => {

resolvePromise();

return typeof children === "function" ? children(mode) : children;
return children;
};
8 changes: 4 additions & 4 deletions src/type.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { ReactNode } from 'react';
import type { ReactNode } from "react";

export type ActivityMode = 'visible' | 'hidden';
export type ActivityMode = "visible" | "hidden";

/**
* @deprecated
Expand All @@ -9,5 +9,5 @@ export type OffscreenMode = ActivityMode;

export interface IProps {
mode: ActivityMode;
children: ReactNode | ((mode: ActivityMode) => ReactNode);
}
children: ReactNode;
}

0 comments on commit ac8462b

Please sign in to comment.