Skip to content

Commit 790625f

Browse files
authored
Fix ViewTransition examples (#7999)
* Fix view transition example * Empty commit * Fix fullscreen example
1 parent 170e5b9 commit 790625f

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

src/content/reference/react/ViewTransition.md

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,11 @@ Enter/Exit Transitions trigger when a `<ViewTransition>` is added or removed by
159159

160160
```js
161161
function Child() {
162-
return <ViewTransition>Hi</ViewTransition>
162+
return (
163+
<ViewTransition>
164+
<div>Hi</div>
165+
</ViewTransition>
166+
);
163167
}
164168

165169
function Parent() {
@@ -352,11 +356,7 @@ button:hover {
352356

353357
```js [3, 5]
354358
function Component() {
355-
return (
356-
<div>
357-
<ViewTransition>Hi</ViewTransition>
358-
</div>
359-
);
359+
return <ViewTransition>Hi</ViewTransition>;
360360
}
361361
```
362362

@@ -519,7 +519,6 @@ button:hover {
519519
background-image: conic-gradient(at top right, #c76a15, #a6423a, #2b3491);
520520
}
521521
.thumbnail.fullscreen {
522-
height: 100%;
523522
width: 100%;
524523
}
525524
.video {

0 commit comments

Comments
 (0)