import React from "react"; import { t } from "../i18n"; import { AppState } from "../types"; import { capitalizeString } from "../utils"; import { trackEvent } from "../analytics"; import { useDevice } from "./App"; import "./LibraryButton.scss"; import { LibraryIcon } from "./icons"; export const LibraryButton: React.FC<{ appState: AppState; setAppState: React.Component["setState"]; isMobile?: boolean; }> = ({ appState, setAppState, isMobile }) => { const device = useDevice(); const showLabel = !isMobile; // TODO barnabasmolnar/redesign // not great, toolbar jumps in a jarring manner if (appState.isSidebarDocked && appState.openSidebar === "library") { return null; } return ( ); };