@sparkpost/matchbox
Version:
A design system
67 lines (53 loc) • 1.61 kB
Markdown
- [Component Demo](https://sparkpost.github.io/matchbox/)
- [Sass Documentation](src/styles/README.md)
---
In your react project, run:
```bash
npm install @sparkpost/matchbox --save
```
There are multiple ways to use Matchbox's styles. If you aren't running a build tool like webpack and just need to import all the css, use `styles.css`
Source files are written in Sass (`.scss`). You can add `node_modules` to your webpack config's `includePaths` and import the files like:
```css
/*
Transpiled css in scss format - .css also available
Include this only once to include React component styles and global styles
*/
@import '~@sparkpost/matchbox/styles.scss';
@import '~@sparkpost/matchbox/styles.css';
/*
Config does not output and css
Use this for your own component styles or if you want to use functions or mixins
*/
@import '~@sparkpost/matchbox/src/styles/config.scss';
```
In-depth usage docs coming in the future. For now, reference [storybook](https://sparkpost.github.io/matchbox/).
```js
import React from ‘react’;
import { Panel } from '@sparkpost/matchbox';
const YourComponent = () => (
<Panel accent title='Hey!'>
<Panel.Section>
Section Content
</Panel.Section>
</Panel>
);
```
```bash
npm run build
```
[](https://github.com/storybooks/storybook) is included for local development.
```bash
npm run storybook
npm run deploy-storybook
```