Skip to content
This repository has been archived by the owner on Aug 14, 2024. It is now read-only.

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
  • Loading branch information
ryan953 authored Dec 14, 2023
1 parent 1048171 commit 718b087
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/docs/frontend/component-library.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -118,13 +118,13 @@ Helper Components:

- [`<Matrix />`](https://github.com/getsentry/sentry/blob/master/static/app/components/stories/matrix.tsx)<br />
A helper to render multiple pairs of properties and values in a grid.
For example, we can render all button `priority` values against all possible `size` values which results in a 4x5 matrix of outputs.
For example, we can render N values for one props, against M values for another prop. The example below compares 4 values for button `size` against 5 values for `priority`, resulting in a 20 example buttons in a grid.
```typescript
<Matrix
render={() => Button}
propMatrix={{
priority: ['default', 'primary'],
size: ['md', 'sm'],
priority: ['default', 'primary', 'danger', 'link', undefined],
size: ['md', 'sm', 'xs', 'zero'],
}}
selectedProps={['priority', 'size']}
/>
Expand Down

0 comments on commit 718b087

Please sign in to comment.