Skip to content

Commit e230b63

Browse files
committed
Shrink image demo portraits so both cards fit without layout shift
1 parent 049bd8e commit e230b63

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

src/content/reference/react/Suspense.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2906,7 +2906,7 @@ import VanillaProfile from './VanillaProfile.js';
29062906
function Profile({ src }) {
29072907
return (
29082908
<div className="card">
2909-
<img src={src} alt="Jack Pope" width={100} height={100} />
2909+
<img src={src} alt="Jack Pope" width={80} height={80} />
29102910
<p>Jack Pope</p>
29112911
</div>
29122912
);
@@ -2955,7 +2955,7 @@ export default function VanillaProfile() {
29552955
const ref = useRef(null);
29562956
function show() {
29572957
ref.current.innerHTML = `<div class="card">
2958-
<img src="${freshImageUrl()}" alt="Jack Pope" width="100" height="100" />
2958+
<img src="${freshImageUrl()}" alt="Jack Pope" width="80" height="80" />
29592959
<p>Jack Pope</p>
29602960
</div>`;
29612961
}
@@ -2978,7 +2978,7 @@ export function freshImageUrl() {
29782978
29792979
```css
29802980
#root {
2981-
min-height: 320px;
2981+
min-height: 390px;
29822982
}
29832983
.card {
29842984
margin-top: 1em;
@@ -2992,8 +2992,8 @@ export function freshImageUrl() {
29922992
font-weight: bold;
29932993
}
29942994
.avatar-placeholder {
2995-
width: 100px;
2996-
height: 100px;
2995+
width: 80px;
2996+
height: 80px;
29972997
border-radius: 50%;
29982998
background: #dfe3e9;
29992999
}

0 commit comments

Comments
 (0)