Add GitBook theme structure with Traditional Chinese docs
This commit is contained in:
27
gitbook/components/TagGroups.js
Normal file
27
gitbook/components/TagGroups.js
Normal file
@@ -0,0 +1,27 @@
|
||||
import TagItemMini from './TagItemMini'
|
||||
|
||||
/**
|
||||
* 標籤組
|
||||
* @param tags
|
||||
* @param currentTag
|
||||
* @returns {JSX.Element}
|
||||
* @constructor
|
||||
*/
|
||||
const TagGroups = ({ tagOptions, currentTag }) => {
|
||||
if (!tagOptions) return <></>
|
||||
return (
|
||||
<div id='tags-group' className='dark:border-gray-600 py-4'>
|
||||
<div className='mb-2'><i className='mr-2 fas fa-tag' />標籤</div>
|
||||
<div className='space-y-2'>
|
||||
{
|
||||
tagOptions?.map(tag => {
|
||||
const selected = tag.name === currentTag
|
||||
return <TagItemMini key={tag.name} tag={tag} selected={selected} />
|
||||
})
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
export default TagGroups
|
Reference in New Issue
Block a user