Skip to content

Commit 731f36d

Browse files
committed
add image styles to thumbnails
1 parent a8f9878 commit 731f36d

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

packages/dev/s2-docs/src/CardList.tsx

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,14 @@ const linkCardStyles = style({
177177
...focusRing()
178178
});
179179

180+
const illustrationStyles = style({
181+
width: 'full',
182+
aspectRatio: '3/2',
183+
objectFit: 'cover',
184+
userSelect: 'none',
185+
pointerEvents: 'none'
186+
});
187+
180188
export function CardList({selectedLibrary, pages}: CardListProps) {
181189
let sectionsData = useMemo(() => {
182190
if (!pages || !Array.isArray(pages)) {
@@ -276,7 +284,10 @@ export function CardList({selectedLibrary, pages}: CardListProps) {
276284
size="S">
277285
{IllustrationComponent && (
278286
<CardPreview>
279-
<IllustrationComponent aria-hidden="true" />
287+
<IllustrationComponent
288+
aria-hidden="true"
289+
// @ts-ignore
290+
className={illustrationStyles} />
280291
</CardPreview>
281292
)}
282293
<Content>

0 commit comments

Comments
 (0)