import React, { useState, useEffect } from 'react' import PropTypes from 'prop-types' import { OverlayTrigger, Tooltip } from 'react-bootstrap' import classNames from 'classnames' import OutlineRoot from './OutlineRoot' function OutlinePane({ isTexFile, outline, jumpToLine }) { const [expanded, setExpanded] = useState(true) useEffect(() => setExpanded(isTexFile), [isTexFile]) const expandCollapseIconClasses = classNames('fa', 'outline-caret-icon', { 'fa-angle-down': expanded, 'fa-angle-right': !expanded }) const headerClasses = classNames('outline-pane', { 'outline-pane-disabled': !isTexFile }) function handleExpandCollapseClick() { if (isTexFile) { setExpanded(!expanded) } } return (