feat: 增加 CoverWall 组件

This commit is contained in:
qier222 2022-05-14 15:28:01 +08:00
parent b2cd51bbc8
commit ffcc60b793
No known key found for this signature in database
GPG key ID: 9C85007ED905F14D
3 changed files with 74 additions and 1 deletions

View file

@ -0,0 +1,22 @@
import cx from 'classnames'
const bigCover = [0, 2, 3, 8, 9, 11, 16, 18, 24, 26, 27]
const CoverWall = ({ covers }: { covers: string[] }) => {
return (
<div className='grid auto-rows-auto grid-cols-8 gap-[13px] '>
{covers.map((cover, index) => (
<img
src={cover}
key={cover}
className={cx(
'rounded-3xl',
bigCover.includes(index) && 'col-span-2 row-span-2'
)}
/>
))}
</div>
)
}
export default CoverWall