File tree Expand file tree Collapse file tree 5 files changed +17
-11
lines changed Expand file tree Collapse file tree 5 files changed +17
-11
lines changed Original file line number Diff line number Diff line change 1
1
{
2
- "version" : " 1.0.1 " ,
2
+ "version" : " 1.0.2 " ,
3
3
"license" : " MIT" ,
4
4
"main" : " dist/index.js" ,
5
5
"typings" : " dist/index.d.ts" ,
Original file line number Diff line number Diff line change 1
1
import React , { Suspense } from 'react' ;
2
2
import { Repeater } from './Repeater' ;
3
- import type { FC , ReactNode } from 'react' ;
3
+ import type { FC } from 'react' ;
4
+ import type { IProps } from './type' ;
4
5
5
- export const Offscreen : FC < {
6
- mode : 'visible' | 'hidden' ;
7
- children : ReactNode ;
8
- } > = ( props ) => {
6
+ export const Offscreen : FC < IProps > = ( props ) => {
9
7
const { mode, children } = props ;
10
8
return (
11
9
< Suspense >
Original file line number Diff line number Diff line change 1
1
import React , { useRef , useEffect } from 'react' ;
2
- import type { FC , ReactNode } from 'react' ;
2
+ import type { FC } from 'react' ;
3
+ import type { IProps } from './type' ;
3
4
4
- export const Repeater : FC < {
5
- mode : 'visible' | 'hidden' ;
6
- children : ReactNode ;
7
- } > = ( props ) => {
5
+ export const Repeater : FC < IProps > = ( props ) => {
8
6
// props
9
7
const { mode, children } = props ;
10
8
// refs
Original file line number Diff line number Diff line change 1
1
export { Offscreen } from './OffScreen' ;
2
+
3
+ export type { OffscreenMode } from './type' ;
Original file line number Diff line number Diff line change
1
+ import type { ReactNode } from 'react' ;
2
+
3
+ export type OffscreenMode = 'visible' | 'hidden' ;
4
+
5
+ export interface IProps {
6
+ mode : OffscreenMode ;
7
+ children : ReactNode ;
8
+ }
You can’t perform that action at this time.
0 commit comments