- implement lists

- implement generic sections
- implement list actions
- implement error handlers
This commit is contained in:
Amruth Pillai
2020-07-08 05:01:50 +05:30
parent d7e86ddf29
commit bee6a40e9f
38 changed files with 762 additions and 177 deletions
+26
View File
@@ -0,0 +1,26 @@
import { isEmpty } from "lodash";
import React from "react";
import { MdAdd } from "react-icons/md";
import Button from "../../shared/Button";
import EmptyList from "./EmptyList";
import styles from "./List.module.css";
const List = ({ items, onAdd, children }) => {
return (
<div className="flex flex-col">
<div className={styles.container}>
{isEmpty(items) ? <EmptyList /> : children}
</div>
<Button
outline
icon={MdAdd}
title="Add New"
onClick={onAdd}
className="mt-8 ml-auto"
/>
</div>
);
};
export default List;