Skip to content

Commit 617450f

Browse files
tudorpopamsCopilot
andcommitted
fix(headless-stories): match deployed Skeleton story layout
The Skeleton demo had an extra 140px 'thumb' bar and a shimmer animation that didn't match the deployed reference. Rewrite the CSS module to match the deployed look: a clean card with avatar + two short lines, then three horizontal bars with a softer pulse animation. Drop the unused .thumb. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 332789e commit 617450f

2 files changed

Lines changed: 33 additions & 27 deletions

File tree

packages/react-components/react-headless-components-preview/stories/src/Skeleton/SkeletonDefault.stories.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,14 @@ export const Default = (): React.ReactNode => (
88
<Skeleton className={`${styles.card} ${styles.demo}`}>
99
<div className={styles.row}>
1010
<SkeletonItem className={styles.circle} />
11-
<div className={`${styles.card} ${styles.demoFlex}`}>
11+
<div className={styles.demoFlex}>
1212
<SkeletonItem className={`${styles.bar} ${styles.line60}`} />
1313
<SkeletonItem className={`${styles.bar} ${styles.line40}`} />
1414
</div>
1515
</div>
16-
<SkeletonItem className={styles.thumb} />
1716
<SkeletonItem className={`${styles.bar} ${styles.line100}`} />
1817
<SkeletonItem className={`${styles.bar} ${styles.line100}`} />
19-
<SkeletonItem className={`${styles.bar} ${styles.line60}`} />
18+
<SkeletonItem className={`${styles.bar} ${styles.line80}`} />
2019
</Skeleton>
2120
);
2221

Lines changed: 31 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,41 @@
11
.card {
22
display: flex;
33
flex-direction: column;
4-
gap: 14px;
4+
gap: 12px;
55
width: 100%;
6+
padding: 16px;
7+
background: var(--bg-elev);
8+
border: 1px solid var(--border);
9+
border-radius: var(--radius-lg);
610
}
711

812
.row {
913
display: flex;
10-
gap: 14px;
14+
gap: 12px;
1115
align-items: center;
1216
}
1317

18+
.demoFlex {
19+
display: flex;
20+
flex: 1;
21+
flex-direction: column;
22+
gap: 8px;
23+
}
24+
1425
.bar {
1526
height: 12px;
1627
border-radius: var(--radius-xs);
17-
background: linear-gradient(90deg, var(--surface-muted) 0%, var(--surface-sunken) 50%, var(--surface-muted) 100%);
18-
background-size: 200% 100%;
19-
animation: shimmer 1.6s linear infinite;
28+
background: var(--surface-muted);
29+
animation: pulse 1.6s ease-in-out infinite;
2030
}
2131

2232
.circle {
23-
width: 44px;
24-
height: 44px;
33+
width: 40px;
34+
height: 40px;
2535
border-radius: 50%;
36+
background: var(--surface-muted);
37+
flex-shrink: 0;
38+
animation: pulse 1.6s ease-in-out infinite;
2639
}
2740

2841
.line40 {
@@ -33,32 +46,26 @@
3346
width: 60%;
3447
}
3548

36-
.line100 {
37-
width: 100%;
49+
.line80 {
50+
width: 80%;
3851
}
3952

40-
.thumb {
41-
height: 140px;
42-
border-radius: var(--radius-lg);
53+
.line100 {
54+
width: 100%;
4355
}
4456

45-
@keyframes shimmer {
46-
0% {
47-
background-position: 200% 0;
48-
}
57+
@keyframes pulse {
58+
0%,
4959
100% {
50-
background-position: -200% 0;
60+
opacity: 1;
61+
}
62+
50% {
63+
opacity: 0.5;
5164
}
5265
}
5366

5467
/* Demo helpers (used by Storybook examples) */
5568

5669
.demo {
57-
max-width: 400px;
58-
}
59-
60-
.demoFlex {
61-
flex: 1;
62-
63-
gap: 8px;
70+
max-width: 384px;
6471
}

0 commit comments

Comments
 (0)