Component documentation template
Component Name
note
Docusaurus automatically uses the site's title
as its main heading
Also, write the purpose of the component here. Keep it direct and short.
Example
(Base example of the component)
Usage Rules
These are general design UI Do’s / Don’ts and notes.
Feel free to put pics here, especially comparison shots to make it clear how to use the component properly.
Avoid writing too much, be clear and to the point. One or two sentences per rule is preferred, 3 max.
With MDX you can also use Figma embeds to visualize Do's and Don'ts:
Copy paste this code lines into your MDX:
import { FigmaEmbed } from '../../src/components/FigmaEmbed';
<FigmaEmbed embedUrl="https://www.figma.com/file/TEHijB0j0gxT9AVKInGuSo/Atlas-Documentation?node-id=67%3A1416" height="200" />;
tip
You can specify height
and width
in the code to make the container taller or wider.
Usage Rule Subheader
Subheaders are optional and used to make a specific point. Use them to keep info easy to digest.
Variants
Name of Variant
Write the purpose of the component here. One or two sentences per rule is preferred, 3 max. List all variants.
(interactive example here using a live editor)
```jsx live
<MyComponent/>
```
Name of Variant (2)
Write the purpose of the component here. One or two sentences per rule is preferred, 3 max. List all variants.
(interactive example here using a live editor)
Props
For rendering a list of property for a compoonent we've developed a component called PropertyTable
.
You can use MDX to integrate it into the documentation:
Name | Type | Default |
---|---|---|
appName * The appName will be used as a placeholder in case the app icon is not available |
| — |
css Add custom styles to this component. Use with caution. Learn more here: Link |
| — |
inputFieldCss |
| — |
appId An app id in either Android's namespace format (e.g. "com.adjust.insights") or in iOS' number format (e.g. "1125517808") |
| — |
size Size of the icon |
| "medium" |
customQueryClient custom queryClient for query hook |
| — |
data-{foo} Data attributes can be used by testing libraries to retrieve components or assert their existence |
| — |
* - the prop is required. |
Copy paste this code lines into your MDX:
import { PropertyTable } from '../../src/components/PropertyTable';
<PropertyTable of="AppIcon" />;
Make sure to:
- Include the newly developed component into the type
ComponentType
here and runyarn gen-types
on root. - Add the path to the component here
note
In case the PropertyTable can't find the props for a component appending "Component" to the component name in the of
prop as shown above.
Accessibility
See our accessibility guidelines for more information
Notes
Optional. Use if necessary if there’s other information that doesn’t quite fit in the other sections.
Related Components
- (link to Related Component here)
- (link to Related Component here)