mirror of
https://github.com/d0zingcat/NotionNext.git
synced 2026-06-06 15:10:29 +00:00
theme-next-refactor
This commit is contained in:
29
themes/next/components/BlogListBar.js
Normal file
29
themes/next/components/BlogListBar.js
Normal file
@@ -0,0 +1,29 @@
|
||||
|
||||
import CategoryList from './CategoryList'
|
||||
import StickyBar from './StickyBar'
|
||||
import TagList from './TagList'
|
||||
|
||||
/**
|
||||
* 博客列表上方嵌入
|
||||
* @param {*} props
|
||||
* @returns
|
||||
*/
|
||||
export default function BlogListBar(props) {
|
||||
const { tagOptions, tag } = props
|
||||
const { category, categoryOptions } = props
|
||||
if (tag) {
|
||||
return (
|
||||
<StickyBar>
|
||||
<TagList tagOptions={tagOptions} currentTag={tag} />
|
||||
</StickyBar>
|
||||
)
|
||||
} else if (category) {
|
||||
return (
|
||||
<StickyBar>
|
||||
<CategoryList currentCategory={category} categoryOptions={categoryOptions} />
|
||||
</StickyBar>
|
||||
)
|
||||
} else {
|
||||
return <></>
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user