stash/ui/v2/src/components/Sidebar.tsx
WithoutPants 66b4f6db4f Fix react warnings (#317)
* Remove unused imports

* Fix === warnings

* Remove unnecessary escape character

* Add alt text for images

* Add missing alt text

* Remove unused variable

* Change scrubber buttons from anchors

* Change folder select anchor to button

* Replace anchors with buttons

* Add missing useEffect dependencies

* Refactor filter debounce

* Throw error object

* Update dependencies

* Fix === warning
2020-01-16 13:36:38 -05:00

31 lines
637 B
TypeScript

import {
MenuItem,
Menu,
} from "@blueprintjs/core";
import React, { FunctionComponent } from "react";
import { IMenuItem } from "../App";
interface IProps {
className: string
menuItems: IMenuItem[]
}
export const Sidebar: FunctionComponent<IProps> = (props) => {
return (
<>
<div className={"sidebar" + props.className}>
<Menu large={true}>
{props.menuItems.map((i) => {
return (
<MenuItem
icon={i.icon}
text={i.text}
href={i.href}
/>
)
})}
</Menu>
</div>
</>
);
};