mirror of
https://github.com/vercel/commerce.git
synced 2025-07-22 12:24:18 +00:00
✨ feat: add blog card
:%s
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
.listBlogCardSkeleton {
|
||||
display: flex;
|
||||
overflow: hidden;
|
||||
width: 90%;
|
||||
justify-content: space-between;
|
||||
div{
|
||||
min-width: 32rem;
|
||||
}
|
||||
|
||||
&.wrap {
|
||||
flex-wrap: wrap;
|
||||
overflow: unset;
|
||||
> div {
|
||||
margin-bottom: 1.6rem;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@@ -0,0 +1,20 @@
|
||||
import classNames from 'classnames'
|
||||
import { ProductCardSkeleton } from '..'
|
||||
import s from './ListBlogCardSkeleton.module.scss'
|
||||
|
||||
type Props = {
|
||||
count?: number
|
||||
isWrap?: boolean,
|
||||
}
|
||||
const ListBlogCardSkeleton = ({ count = 3, isWrap }: Props) => {
|
||||
|
||||
return (
|
||||
<div className={classNames(s.listBlogCardSkeleton, { [s.wrap]: isWrap })}>
|
||||
{
|
||||
Array.from(Array(count).keys()).map(item => <ProductCardSkeleton key={item} />)
|
||||
}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
export default ListBlogCardSkeleton
|
Reference in New Issue
Block a user