Skip to content

Commit daa68f2

Browse files
authored
feat(docs): Props section for Code Block component (#1776)
1 parent 8ab73c1 commit daa68f2

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

apps/docs/components/code-block.mdx

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,5 +129,28 @@ For you to not need to defined a theme without any basis, or to not define one t
129129
These themes were generated by a bit of code that converts a CSS file for a prismjs theme into a object theme of these.
130130
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).
131131

132+
## Props
133+
134+
<ResponseField name="lineNumbers" type="boolean">
135+
Whether or not to automatically include line numbers on the rendered code block
136+
</ResponseField>
137+
138+
<ResponseField name="fontFamily" type="string">
139+
The font family value to go into the `fontFamily: "..."` style for
140+
all used elements of the component
141+
</ResponseField>
142+
143+
<ResponseField name="theme" type="Theme" required>
144+
An object representation of a PrismJS CSS theme
145+
</ResponseField>
146+
147+
<ResponseField name="language" type="string" required>
148+
The language under the supported languages defined in `PrismLanguage`
149+
</ResponseField>
150+
151+
<ResponseField name="code" type="string" required>
152+
The actual code to render in the code block. Just a plain string, with the proper identation included.
153+
</ResponseField>
154+
132155
<Support/>
133156

0 commit comments

Comments
 (0)