Skip to content
This repository has been archived by the owner on Feb 22, 2024. It is now read-only.

CardList

Rustem Kakimov edited this page Jun 12, 2018 · 4 revisions

API

Property Description Type Default
data_source Array of all row objects object[] -
Card React component that is passed values from data_source[i] as props. component -

How to use

const example_data_source = [
    {
        name: 'Bob',
        second_name: 'Marly',
    },
    {
        name: 'Rick',
        second_name: 'Sanches',
    },
];

const ExampleCard = ({ name, second_name }) => (
    <div className='card'>
        <span>{name}</span>
        <span>{second_name}</span>
    </div>
);

<CardList
    data_source={example_data_source}
    Card={ExampleCard}
/>
Clone this wiki locally