0.0.3 • Published 5 years ago

@mariosant/react-flex-list v0.0.3

Weekly downloads
1
License
MIT
Repository
github
Last release
5 years ago

React Flex List

Create flex powered lists in react.

ko-fi

NPM version CircleCI

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 – mariosant@sent.com

Distributed under the MIT license. https://github.com/mariosant/react-flex-list

Contributing

  1. Fork it (https://github.com/mariosant/react-flex-list/fork)
  2. Create your feature branch (git checkout -b feature/fooBar)
  3. Commit your changes using a semantic commit message.
  4. Push to the branch (git push origin feature/fooBar)
  5. Create a new Pull Request