Add code snippets like below with PrismJS. Create your custom theme here & import the JS
& CSS
provided at the bottom of the page in the index.html
file.
Note: Only import languages that are actually used in your application as every language imported increases the size of the application.
const snippet = `
function fun () {
return (
<div>Hello there!</div>
)
}`
<Code snippet={snippet} lang='jsx' />
Code
Name | Type | Usage |
---|---|---|
.. | All div element props | |
snippet | string | |
lang | string | Check all available languages here |