gitbook 主题框架

This commit is contained in:
tangly1024
2023-06-23 10:41:43 +08:00
parent 6e76efcde0
commit ee2872d72d
46 changed files with 1688 additions and 5 deletions

View File

@@ -0,0 +1,19 @@
import React from 'react'
import CategoryItem from './CategoryItem'
const CategoryGroup = ({ currentCategory, categoryOptions }) => {
if (!categoryOptions) {
return <></>
}
return <div id='category-list' className='pt-4'>
<div className='mb-2'><i className='mr-2 fas fa-th' />分类</div>
<div className='flex flex-wrap'>
{categoryOptions?.map(category => {
const selected = currentCategory === category.name
return <CategoryItem key={category.name} selected={selected} category={category.name} categoryCount={category.count} />
})}
</div>
</div>
}
export default CategoryGroup