Install
Install the component from your command line.Getting Started
Add the component into your email component as follows.Theming
Themes for this component are basically a set of styles for each kind of token that can result from prismjsās tokenization. See here for more information on the tokens available. An example of a theme would be this:React elements.
As you can see from the example dracula theme though, there is a defined property called base which is the styling for the pre element that wraps the HTML being rendered.
For you to not need to defined a theme without any basis, or to not define one that already has been defined, we have many default themes exported from react-email.
These themes were generated by a bit of code that converts a CSS file for a prismjs theme into a object theme of these.
If you want to generate a theme from another existing prismjs theme you can do so by looking into this.
Props
The font family value to go into the
fontFamily: "..." style for
all used elements of the componentThe actual code to render in the code block. Just a plain string, with the proper indentation included.