mirror of
https://github.com/pmndrs/zustand.git
synced 2025-12-08 19:45:52 +00:00
perf(example): remove unnecessary imports of "prismjs" (#1129)
This commit is contained in:
parent
a4b08a10f3
commit
2517d5ab39
@ -1,12 +1,10 @@
|
||||
import Highlight, { defaultProps } from 'prism-react-renderer'
|
||||
import CopyButton from './CopyButton'
|
||||
import 'prismjs'
|
||||
import 'prismjs/components/prism-jsx.min'
|
||||
import 'prismjs/themes/prism-okaidia.css'
|
||||
|
||||
export default function CodePreview({ code, ...props }) {
|
||||
return (
|
||||
<Highlight {...defaultProps} className="language-jsx" code={code} language="jsx" theme={undefined}>
|
||||
<Highlight {...defaultProps} code={code} language="jsx" theme={undefined}>
|
||||
{({ className, style, tokens, getLineProps, getTokenProps }) => (
|
||||
// define how each line is to be rendered in the code block,
|
||||
// position is set to relative so the copy button can align to bottom right
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user