src/components/Code/index.jsx

Render children as syntax-highlighted monospace code.

Prop nameTypeDefaultDescription
childrenstringRequired

The content to render as highlighted syntax.

classNamestringnull

The CSS class name of the wrapper element

languagecustom

A highlight.js language identifier.

{
  "hello": "world!",
  "arr": [
    "alpha",
    "beta",
    "gamma"
  ]
}
src/components/CodeEditor/index.jsx

Render an editor.

Note: material-ui is a peer-dependency

Prop nameTypeDefaultDescription
valuestringRequired

The value of the editor.

classNamestringnull

The CSS class name of the wrapper element

onChangefuncnull

Callback function fired when the editor is changed.

optionsobjectnull

Code mirror options

src/components/ErrorPanel/index.jsx

Render an error in a panel. Will be expandable display stack traces when in development

Note: material-ui is a peer-dependency

Prop nameTypeDefaultDescription
errorunionRequired

Error to display

One of type: string, Error
classNamestringnull

The CSS class name of the wrapper element

disableStackTracebooltrue

If false, the error will show its stack trace in addition to the error message. For security purposes, it is recommended to disable stack traces in production.

onClosefuncnull

Execute a function to make the panel controlled-closeable.

warningboolfalse

Render the panel with a warning palette instead of the harsher error palette.

String message:

Something bad happened

Exception, in development:

Error with markdown:

Markdown is also supported.

Warning styling:

Something bad happened

Warning with markdown:

Markdown is also supported.

src/components/Label/index.jsx

A label color-coded based on a given status.

Note: material-ui is a peer-dependency

Prop nameTypeDefaultDescription
childrennodeRequired

Content to render within the label.

statusenumRequired

An intent-driven color indicator.

One of: error, success, warning, default, info
classNamestringnull

The CSS class name of the wrapper element

miniboolfalse

Show label using dense styling.

Standard sizes:

Mini:

src/components/Markdown/index.jsx

Render children as syntax-highlighted monospace code.

Note: material-ui is a peer-dependency

Prop nameTypeDefaultDescription
childrenstringRequired

The content to render as Markdown.

Hello world!

How are you?

Here's some inline-code.

  • Here's a
  • nice list
  • of things to do
src/components/MarkdownTextArea/index.jsx

An input text field with a markdown preview feature.

Note: material-ui is a peer-dependency

Prop nameTypeDefaultDescription
defaultTabIndexnumber0

An index number used to control which tab is selected as default.

markdownPropsobjectnull

Properties applied to the Markdown component.

onChangefuncnull

A function to handle changes to the markdown text. Required for a controlled component.

placeholderstringnull

A placeholder value used for the markdown text.

rowsnumber5

A number used to control the amount of rows displayed for the input area.

valuestringundefined

The input value for the markdown text. Required for a controlled component.

src/components/Spinner/index.jsx

Render an indeterminate spinning indicator.

Note: material-ui is a peer-dependency

Prop nameTypeDefaultDescription
classNamestringnull

The CSS class name of the wrapper element

colorenumprimary

The color of the component. It supports those theme colors that make sense for this component.

One of: primary, secondary, inherit
loadingboolfalse

Set to true to render the spinner with its own block-centered container.

Default inline spinner:

Block-centered "loading" spinner:

Mozilla Frontend Infra Components Style Guide