mirror of
https://github.com/AmruthPillai/Reactive-Resume.git
synced 2026-07-25 01:15:26 +10:00
- implement lists
- implement generic sections - implement list actions - implement error handlers
This commit is contained in:
@@ -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;
|
||||
Reference in New Issue
Block a user