1
Fork 0
mirror of https://github.com/Steffo99/bluelib.git synced 2024-12-23 12:04:22 +00:00
bluelib/src/components/Code
2021-01-25 19:37:58 +01:00
..
index.js First commit (of this branch) 2021-01-25 19:37:58 +01:00
Readme.md First commit (of this branch) 2021-01-25 19:37:58 +01:00

A code block which strips excess indentation and applies syntax highlighting.

Appearently explodes if String.raw is used. Wat?

import {atomOneLight} from "react-syntax-highlighter/dist/cjs/styles/hljs";

<Code language={"python"} skin={atomOneLight}>
    {`
        def hello():
            print("Hello world!")
    `}
</Code>