#
Demos#
IntroductionMore info on demos. Each demo should have a live code block for you to tinker with.
#
How To Add Demo#
General Info- Your demo should be placed in a folder under
~/demos
.- For example,
~/demos/override/row
- For example,
- You have the ability to use React inside of markdown
- Make sure your file ends in
.mdx
- Refer to an existing demo file for a better understanding
- Make sure your file ends in
- Each
.mdx
or.md
file has to have a header- See here for an example
- The
id
is required and needs to be unique per folder - See here for more on markdown headers
- Highly recommend reading more on markdown features here
#
Sidebar- To show your demo in the sidebar you need to edit
~/sidebar.demos.js
- If I wanted to add a demo to the URL
/demo/override/row
I would- Create a file at
~/demos/override/row.md
could also use.mdx
extension - Update sidebar.demos.js
- *The
id
needs to be the same as the ending of the path you put into~/sidebar.demos.js
- Create a file at
- If I wanted to add a demo to the URL
#
row.mdx#
sidebar.demos.js#
Demo EnvironmentIn order to keep our demos succinct, we take advantage of "global variables". Global variables will be in all caps snake case.
#
Environmental VariablesThe values for our global environmental variables can be found below.
#
Important NotePLEASE NOTE
The list below may not be up to date! Please see here for more
DEMO_DATA
#
This data is passed into <MaterialTable data={...} />
DEMO_COLS
#
This data is passed into <MaterialTable columns={...} />
TABLE_ICONS
#
This data is passed into <MaterialTable icons={...} />
The base icons are supplied out of the box.