mirror of
https://github.com/GiriNeko/YesPlayMusic.git
synced 2025-12-16 21:28:06 +00:00
feat: 增加 CoverWall 组件
This commit is contained in:
parent
b2cd51bbc8
commit
ffcc60b793
3 changed files with 74 additions and 1 deletions
22
packages/web/components/CoverWall.tsx
Normal file
22
packages/web/components/CoverWall.tsx
Normal 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
|
||||
Loading…
Add table
Add a link
Reference in a new issue