@mariosant/react-flex-list
TypeScript icon, indicating that this package has built-in type declarations

0.0.3 • Public • Published

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_antmariosant@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

Readme

Keywords

none

Package Sidebar

Install

npm i @mariosant/react-flex-list

Weekly Downloads

1

Version

0.0.3

License

MIT

Unpacked Size

8.24 kB

Total Files

18

Last publish

Collaborators

  • mariosant