import React, { useState } from "react"; import Popup from "../Popup"; import { Link } from "react-router"; interface Props { name: string; to?: string; onClick: Function; children: React.ReactNode; modal: React.ReactNode; keyHint?: React.ReactNode; space?: number externalLink?: boolean /* true if the keyhint is an icon and not text */ icon?: boolean } export default function SidebarItem({ externalLink, space, keyHint, name, to, children, modal, onClick, icon }: Props) { const classes = "hover:cursor-pointer hover:bg-(--color-bg-tertiary) transition duration-100 rounded-md p-2 inline-block"; const popupInner = keyHint ? (