mirror of
https://github.com/jeffvli/feishin.git
synced 2026-05-07 04:20:12 +02:00
fix compact image sizing
This commit is contained in:
@@ -1,11 +1,26 @@
|
||||
.skeleton {
|
||||
width: initial;
|
||||
aspect-ratio: 1 / 1;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border-radius: 0;
|
||||
}
|
||||
|
||||
.compact-image-container .skeleton {
|
||||
border-radius: 0;
|
||||
}
|
||||
|
||||
.compact-image-container {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
overflow: hidden;
|
||||
border-radius: var(--theme-radius-md);
|
||||
}
|
||||
|
||||
.compact-image-container img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
object-fit: cover;
|
||||
object-position: center;
|
||||
border-radius: 0;
|
||||
}
|
||||
|
||||
.image-container-with-aspect-ratio {
|
||||
|
||||
@@ -109,7 +109,13 @@ export const ImageColumn = (props: ItemTableListInnerColumn) => {
|
||||
|
||||
return (
|
||||
<TableColumnContainer {...props}>
|
||||
<Skeleton containerClassName={styles.skeleton} />
|
||||
<div
|
||||
className={clsx(styles.imageContainer, {
|
||||
[styles.compactImageContainer]: props.size === 'compact',
|
||||
})}
|
||||
>
|
||||
<Skeleton containerClassName={styles.skeleton} />
|
||||
</div>
|
||||
</TableColumnContainer>
|
||||
);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user