mirror of
https://github.com/Stremio/stremio-web.git
synced 2026-08-17 00:08:16 +00:00
MetaItem fallback to poster shape poster if posterShape is invalid
This commit is contained in:
parent
52bc54b7d6
commit
723218d145
2 changed files with 7 additions and 7 deletions
|
|
@ -38,7 +38,7 @@ const MetaItem = React.memo(({ className, id, type, name, posterShape = 'square'
|
|||
event.nativeEvent.selectItemPrevented = true;
|
||||
}, [menuOptionOnSelect]);
|
||||
return (
|
||||
<Button className={classnames(className, styles['meta-item-container'], styles[`poster-shape-${posterShape}`], { 'active': menuOpen })} title={name} data-id={id} onClick={metaItemOnClick}>
|
||||
<Button className={classnames(className, styles['meta-item-container'], styles['poster-shape-poster'], styles[`poster-shape-${posterShape}`], { 'active': menuOpen })} title={name} data-id={id} onClick={metaItemOnClick}>
|
||||
<div className={styles['poster-image-container']}>
|
||||
<div className={styles['placeholder-image-layer']}>
|
||||
<Icon
|
||||
|
|
|
|||
|
|
@ -21,6 +21,12 @@
|
|||
}
|
||||
}
|
||||
|
||||
&.poster-shape-poster {
|
||||
.poster-image-container {
|
||||
padding-top: calc(100% * var(--poster-shape-ratio));
|
||||
}
|
||||
}
|
||||
|
||||
&.poster-shape-square {
|
||||
.poster-image-container {
|
||||
padding-top: 100%;
|
||||
|
|
@ -33,12 +39,6 @@
|
|||
}
|
||||
}
|
||||
|
||||
&.poster-shape-poster {
|
||||
.poster-image-container {
|
||||
padding-top: calc(100% * var(--poster-shape-ratio));
|
||||
}
|
||||
}
|
||||
|
||||
.poster-image-container {
|
||||
position: relative;
|
||||
z-index: -1;
|
||||
|
|
|
|||
Loading…
Reference in a new issue