@mariosant/react-flex-list
v0.0.3
Published
Create flex powered lists in react.
Downloads
2
Readme
React Flex List
Create flex powered lists in react.
Installation
Add @mariosant/react-flex-list
to your package.json
.
$ npm install @mariosant/react-flex-list styled-components react
You can now import the module and use it like
import List from '@mariosant/react-flex-list';
const items = ['rock', 'metal', 'thrash'];
const renderItem = item => <div key={item}>{item}</div>;
export default () => <List flexDirection="column" items={items} renderItem={renderItem} />;
Usage
The component's purpose is to ease the rendering of avg sized lists. It is based on Rebass' Flex component and it basically inherits all the power the Flex component has.
Props
The component extends Rebass' Flex props and adds the following:
items: any[]
renderItem: (item: any) => ReactElement
Meta
Marios Antonoudiou – @marios_ant – [email protected]
Distributed under the MIT license. https://github.com/mariosant/react-flex-list
Contributing
- Fork it (https://github.com/mariosant/react-flex-list/fork)
- Create your feature branch (
git checkout -b feature/fooBar
) - Commit your changes using a semantic commit message.
- Push to the branch (
git push origin feature/fooBar
) - Create a new Pull Request