build: 支持 twin。
This commit is contained in:
19
src/styles/global-styles.tsx
Normal file
19
src/styles/global-styles.tsx
Normal file
@ -0,0 +1,19 @@
|
||||
import React from 'react';
|
||||
import { Global, css } from '@emotion/react';
|
||||
import tw, { theme, GlobalStyles as BaseStyles } from 'twin.macro';
|
||||
|
||||
const customStyles = css({
|
||||
body: {
|
||||
WebkitTapHighlightColor: theme`colors.purple.500`,
|
||||
...tw`antialiased dark:bg-dark-800 bg-dark-100`,
|
||||
},
|
||||
});
|
||||
|
||||
const GlobalStyles = () => (
|
||||
<>
|
||||
<BaseStyles />
|
||||
<Global styles={customStyles} />
|
||||
</>
|
||||
);
|
||||
|
||||
export default GlobalStyles;
|
Reference in New Issue
Block a user