Update snippet formatting

This commit is contained in:
Isabelle Viktoria Maciohsek
2020-09-06 14:20:45 +03:00
parent f384fc0ee3
commit 95746a843b
18 changed files with 60 additions and 71 deletions

View File

@ -10,10 +10,10 @@ Renders a list of elements from an array of primitives.
- Omit the `isOrdered` prop to render a `<ul>` list by default.
```jsx
function DataList({ isOrdered, data }) {
const DataList = ({ isOrdered, data }) => {
const list = data.map((val, i) => <li key={`${i}_${val}`}>{val}</li>);
return isOrdered ? <ol>{list}</ol> : <ul>{list}</ul>;
}
};
```
```jsx