@fortawesome/free-solid-svg-icons#faGreaterThan JavaScript Examples

The following examples show how to use @fortawesome/free-solid-svg-icons#faGreaterThan. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: navbar.js    From andromedev with MIT License 5 votes vote down vote up
Navbar = ({ currentPage, className }) => {
  const [isOpen, setIsOpen] = useState(false);

  return (
    <>
      <button
        className={`bg-purple-800 w-16 h-16  text-white flex items-center justify-center rounded-full fixed bottom-0 right-0 mr-1 mb-4 xl:hidden z-40`}
        onClick={() => setIsOpen(!isOpen)}
      >
        {!isOpen ? (
          <>
            <FontAwesomeIcon icon={faLessThan} />{" "}
            <FontAwesomeIcon icon={faGreaterThan} />
          </>
        ) : (
          <FontAwesomeIcon icon={faTimes} size="lg" />
        )}
      </button>
      <aside
        className={classNames(
          "z-20 fixed border-gray-300 border-r-2 overflow-hidden duration-500 bg-white h-full",
          {
            "w-0": !isOpen,
            "w-4/5 border-solid border-r-2": isOpen,
          },
          "xl:w-64 xl:border-solid xl:border-r-2",
          className
        )}
      >
        <nav className="flex flex-col truncate">
          {items.map((item, index) => (
            <Item
              key={index}
              slug={item.slug}
              className={item.className}
              active={item.slug === currentPage}
            >
              {item.text}
            </Item>
          ))}
        </nav>
      </aside>
    </>
  );
}