|
| 1 | +import React from "react"; |
| 2 | +import PropTypes from "prop-types"; |
| 3 | +import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; |
| 4 | + |
| 5 | +const Navigation: React.FC<NavigationProps> = ({ width }) => ( |
| 6 | + <aside |
| 7 | + className="h-full flex flex-col bg-gray-50 border-r border-gray-200 shadow-sm" |
| 8 | + style={{ width: `${width}px` }} |
| 9 | + > |
| 10 | + <section className="p-2"> |
| 11 | + <a className="block px-4 py-1 rounded-full cursor-pointer transition duration-150 hover:bg-white hover:shadow-sm"> |
| 12 | + <FontAwesomeIcon className="mr-1" icon="inbox" fixedWidth /> |
| 13 | + <span>Inbox</span> |
| 14 | + </a> |
| 15 | + <a className="block px-4 py-1 rounded-full cursor-pointer transition duration-150 hover:bg-white hover:shadow-sm"> |
| 16 | + <FontAwesomeIcon className="mr-1" icon="users" fixedWidth /> |
| 17 | + <span>Shared</span> |
| 18 | + </a> |
| 19 | + <a className="block px-4 py-1 rounded-full cursor-pointer transition duration-150 hover:bg-white hover:shadow-sm"> |
| 20 | + <FontAwesomeIcon className="mr-1" icon="star" fixedWidth /> |
| 21 | + <span>Starred</span> |
| 22 | + </a> |
| 23 | + <a className="block px-4 py-1 rounded-full cursor-pointer transition duration-150 hover:bg-white hover:shadow-sm"> |
| 24 | + <FontAwesomeIcon className="mr-1" icon="trash-alt" fixedWidth /> |
| 25 | + <span>Trash</span> |
| 26 | + </a> |
| 27 | + </section> |
| 28 | + <section className="p-2 border-t"> |
| 29 | + <header className="mb-2 mx-2 text-gray-700 font-bold text-sm uppercase"> |
| 30 | + Personal Workspace |
| 31 | + </header> |
| 32 | + <a className="block px-4 py-1 rounded-full cursor-pointer transition duration-150 hover:bg-white hover:shadow-sm"> |
| 33 | + <FontAwesomeIcon className="mr-1" icon="folder" fixedWidth /> |
| 34 | + <span>My First Folder</span> |
| 35 | + </a> |
| 36 | + </section> |
| 37 | + <section className="p-2 border-t"> |
| 38 | + <header className="mb-2 mx-2 text-gray-700 font-bold text-sm uppercase"> |
| 39 | + Team Workspaces |
| 40 | + </header> |
| 41 | + <a className="block px-4 py-1 rounded-full cursor-pointer transition duration-150 hover:bg-white hover:shadow-sm"> |
| 42 | + <FontAwesomeIcon className="mr-1" icon="building" fixedWidth /> |
| 43 | + <span>Gossip Inc</span> |
| 44 | + </a> |
| 45 | + <a className="block px-4 py-1 rounded-full cursor-pointer transition duration-150 hover:bg-white hover:shadow-sm"> |
| 46 | + <FontAwesomeIcon className="mr-1" icon="building" fixedWidth /> |
| 47 | + <span>Alibaba Group</span> |
| 48 | + </a> |
| 49 | + <a className="block px-4 py-1 rounded-full cursor-pointer transition duration-150 hover:bg-white hover:shadow-sm"> |
| 50 | + <FontAwesomeIcon className="mr-1" icon="building" fixedWidth /> |
| 51 | + <span>IDEAS Lab</span> |
| 52 | + </a> |
| 53 | + </section> |
| 54 | + </aside> |
| 55 | +); |
| 56 | + |
| 57 | +Navigation.propTypes = { |
| 58 | + width: PropTypes.number.isRequired, |
| 59 | +}; |
| 60 | + |
| 61 | +export default Navigation; |
| 62 | + |
| 63 | +export type NavigationProps = { |
| 64 | + width: number; |
| 65 | +}; |
0 commit comments