elastic / next-eui-starter

Start building Kibana protoypes quickly with the Next.js EUI Starter
https://elastic.github.io/next-eui-starter/
Apache License 2.0
94 stars 30 forks source link

CodeBlock not render properly (Colors)! #21

Open chetanmajithiya opened 3 years ago

chetanmajithiya commented 3 years ago

codeBlock keyword element are getting separately to get styles from css,

chetanmajithiya commented 3 years ago

<EuiCodeBlock language="js" fontSize="m" paddingSize="m" overflowHeight={300} isCopyable>{code}</EuiCodeBlock>

chetanmajithiya commented 3 years ago

https://ibb.co/wgXwKCH https://ibb.co/zXn59mB

chandlerprall commented 3 years ago

Using the same settings within code sandbox highlights the code for me: https://codesandbox.io/s/young-hooks-xylik?file=/index.js

Can you check the devtools' Console and Network tabs for any errors?

chandlerprall commented 3 years ago

Sorry, I lost track of which repo this was asked in. We have limited the language support in this nextjs starter to avoid bloating the bundle size, unless additional languages are needed. Two options:

  1. You can setup your own list of included languages by modifying src/lib/highlight.ts
  2. You can remove the custom configuration entirely in next.config.js by removing lines 104-107 https://github.com/elastic/next-eui-starter/blob/e98ea620878c84fea14095d96806afde5c0fce95/next.config.js#L104-L107