Skip to content

Commit

Permalink
feat(docs): Props section for Code Block component (#1776)
Browse files Browse the repository at this point in the history
  • Loading branch information
gabrielmfern authored Nov 13, 2024
1 parent 8ab73c1 commit daa68f2
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions apps/docs/components/code-block.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -129,5 +129,28 @@ For you to not need to defined a theme without any basis, or to not define one t
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](https://github.com/gabrielmfern/from-prismjs-to-react-email-code-block-theme).

## Props

<ResponseField name="lineNumbers" type="boolean">
Whether or not to automatically include line numbers on the rendered code block
</ResponseField>

<ResponseField name="fontFamily" type="string">
The font family value to go into the `fontFamily: "..."` style for
all used elements of the component
</ResponseField>

<ResponseField name="theme" type="Theme" required>
An object representation of a PrismJS CSS theme
</ResponseField>

<ResponseField name="language" type="string" required>
The language under the supported languages defined in `PrismLanguage`
</ResponseField>

<ResponseField name="code" type="string" required>
The actual code to render in the code block. Just a plain string, with the proper identation included.
</ResponseField>

<Support/>

1 comment on commit daa68f2

@vercel
Copy link

@vercel vercel bot commented on daa68f2 Nov 13, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

react-email-demo – ./apps/demo

react-email-demo-resend.vercel.app
react-email-demo-git-main-resend.vercel.app
demo.react.email
react-email-demo.vercel.app

Please sign in to comment.