File tree Expand file tree Collapse file tree 4 files changed +64
-0
lines changed
Expand file tree Collapse file tree 4 files changed +64
-0
lines changed Original file line number Diff line number Diff line change @@ -214,4 +214,19 @@ declare module "." {
214214 export interface FragmentProps {
215215 ref ?: Ref < FragmentInstance > | undefined ;
216216 }
217+
218+ // @enableActivity
219+ export interface ActivityProps {
220+ /**
221+ * @default "visible"
222+ */
223+ mode ?:
224+ | "hidden"
225+ | "visible"
226+ | undefined ;
227+ children : ReactNode ;
228+ }
229+
230+ /** */
231+ export const unstable_Activity : ExoticComponent < ActivityProps > ;
217232}
Original file line number Diff line number Diff line change @@ -284,3 +284,20 @@ function fragmentRefTest() {
284284 < div />
285285 </ React . Fragment > ;
286286}
287+
288+ // @enableActivity
289+ function activityTest ( ) {
290+ const Activity = React . unstable_Activity ;
291+
292+ < Activity children = "peekaboo" /> ;
293+ < Activity children = "peekaboo" mode = { undefined } /> ;
294+ < Activity children = "peekaboo" mode = "visible" /> ;
295+ < Activity children = "peekaboo" mode = "hidden" /> ;
296+ // @ts -expect-error -- Forgot children
297+ < Activity /> ;
298+ < Activity
299+ children = "peekaboo"
300+ // @ts -expect-error -- Unknown mode
301+ mode = "not-a-mode"
302+ /> ;
303+ }
Original file line number Diff line number Diff line change @@ -214,4 +214,19 @@ declare module "." {
214214 export interface FragmentProps {
215215 ref ?: Ref < FragmentInstance > | undefined ;
216216 }
217+
218+ // @enableActivity
219+ export interface ActivityProps {
220+ /**
221+ * @default "visible"
222+ */
223+ mode ?:
224+ | "hidden"
225+ | "visible"
226+ | undefined ;
227+ children : ReactNode ;
228+ }
229+
230+ /** */
231+ export const unstable_Activity : ExoticComponent < ActivityProps > ;
217232}
Original file line number Diff line number Diff line change @@ -287,3 +287,20 @@ function fragmentRefTest() {
287287 < div />
288288 </ React . Fragment > ;
289289}
290+
291+ // @enableActivity
292+ function activityTest ( ) {
293+ const Activity = React . unstable_Activity ;
294+
295+ < Activity children = "peekaboo" /> ;
296+ < Activity children = "peekaboo" mode = { undefined } /> ;
297+ < Activity children = "peekaboo" mode = "visible" /> ;
298+ < Activity children = "peekaboo" mode = "hidden" /> ;
299+ // @ts -expect-error -- Forgot children
300+ < Activity /> ;
301+ < Activity
302+ children = "peekaboo"
303+ // @ts -expect-error -- Unknown mode
304+ mode = "not-a-mode"
305+ /> ;
306+ }
You can’t perform that action at this time.
0 commit comments