1.0.3 • Published 1 month ago
react-flexible-list v1.0.3
react-flexible-list
Installation :rocket: :rocket: :rocket:
npm install react-flexible-list
or
yarn add react-flexible-list
Usage
import React from 'react';
import GridList from 'react-flexible-list';
const MyComponent = () => {
return (
<GridList
resourceData={ ["By", "Lka", "Dev", "From", "Senegal"] }
resourceItem={ (item) => <p>{item}</p> }
/>
);
};
export default MyComponent;
Props | Type | Default | Description |
---|---|---|---|
isLoading | Boolean | false | Flag to indicate whether the component is in a loading state. |
resourceItem | React.FC<any> | Required* React component responsible for rendering each resource item. | |
resourceData | (string, object,number)Array | Required* Array of data items to be rendered in the GridList. | |
loader | React.ElementType | Custom loader component to be displayed when isLoading is true. | |
skeleton | React.ElementType | Skeleton | Custom skeleton component to be displayed when isLoading is true and loader is not provided. |
emptyComponent | React.ElementType | EmptyList | Custom component to be displayed when resourceData is empty. |
gap | Number | 15 | Column gap in pixels. |
cardWidth | Number | 250 | Width of each card in pixels. |
minHeight | Number | 300 | Minimum height of the grid container in pixels. |
px | Number | 10 | Horizontal padding of the grid container in pixels. |
py | Number | 10 | Vertical padding of the grid container in pixels. |
mx | Number | 0 | Horizontal margin of the grid container in pixels. |
my | Number | 0 | Vertical margin of the grid container in pixels. |
1.0.3
1 month ago
1.0.2
5 months ago
1.0.1
5 months ago
1.0.0
5 months ago
0.1.5
5 months ago
0.1.4
11 months ago
0.1.34
11 months ago
0.1.32
11 months ago
0.1.31
11 months ago
0.1.30
11 months ago
0.1.28
11 months ago
0.1.27
11 months ago
0.1.26
11 months ago
0.1.25
11 months ago
0.1.24
11 months ago
0.1.22
11 months ago
0.1.21
11 months ago
0.1.2
11 months ago
0.1.1
11 months ago
0.1.0
11 months ago