Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] add props table to docs #199

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 10 additions & 5 deletions docs/Cartesian.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,19 @@

# Cartesian

Display the cartesian product of component props

![](images/cartesian.png)

| _Prop_ | _type_ | _default_ | _description_ |
| --------- | ------ | ----------- | -------------------------------------------------------- |
| component | Node | `undefined` | The component to apply the cartesian product to |
| container | Node | `Fragment` | A component to wrap the `component` prop in, for display |
| children | Array | `undefined` | each child you'd like as a part of the product |

```jsx
import React from 'react'
import { Cartesian } from '@compositor/kit'
import Button from '../src/Button'
import React from 'react';
import { Cartesian } from '@compositor/kit';
import Button from '../src/Button';

export default props => (
<Cartesian
Expand All @@ -18,5 +23,5 @@ export default props => (
bg={['blue', 'pink', 'tomato', 'purple']}
children={['Hello, world!', 'Beep']}
/>
)
);
```