feat: add blog card

:%s
This commit is contained in:
Quangnhankie
2021-10-21 16:33:24 +07:00
parent 7ba17af820
commit 6c5c4dd4c2
2 changed files with 38 additions and 0 deletions

View File

@@ -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;
}
}
}

View File

@@ -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