Files
NotionNext/components/TagGroups.js
tangly1024 fffd04651f feature:
theme-Next新的样式
2021-12-23 17:07:12 +08:00

25 lines
533 B
JavaScript

import TagItemMini from '@/components/TagItemMini'
/**
* 标签组
* @param tags
* @param currentTag
* @returns {JSX.Element}
* @constructor
*/
const TagGroups = ({ tags, currentTag }) => {
if (!tags) return <></>
return (
<div id='tags-group' className='dark:border-gray-600 w-66 space-y-2'>
{
tags.map(tag => {
const selected = tag.name === currentTag
return <TagItemMini key={tag.name} tag={tag} selected={selected} />
})
}
</div>
)
}
export default TagGroups