Skip to content

Instantly share code, notes, and snippets.

@nsantos16
Last active July 24, 2020 21:42
Show Gist options
  • Save nsantos16/8da556d82904423cab8e812a921d68fa to your computer and use it in GitHub Desktop.
Save nsantos16/8da556d82904423cab8e812a921d68fa to your computer and use it in GitHub Desktop.
import React from 'react';
const ListItem = ({ item }) => (
<div>
<span>{item}</span>
</div>
);
const List = ({ items = [] }) => (
<div className="list-component">
<ListTitle title="List component" />
<div className="list-component-items">
{items.map(item => (
<ListItem item={item} />
))}
</div>
</div>
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment