GlobalJS,GlobalStyle

This commit is contained in:
tangly1024
2024-01-21 20:12:57 +08:00
parent 1d7a4342eb
commit 93be76e008
4 changed files with 64 additions and 31 deletions

20
components/GlobalStyle.js Normal file
View File

@@ -0,0 +1,20 @@
/* eslint-disable react/no-unknown-property */
import { siteConfig } from '@/lib/config'
/**
* 这里的css样式对全局生效
* 主题客制化css
* @returns
*/
const GlobalStyle = () => {
// 从NotionConfig中读取样式
const GLOBAL_CSS = siteConfig('GLOBAL_CSS')
return (<style jsx global>{`
${GLOBAL_CSS}
`}</style>)
}
export { GlobalStyle }