import { memo } from "react"; import { Button, MenuItem } from "@blueprintjs/core"; import { Select, SelectProps } from "@blueprintjs/select"; import { Placement } from "@blueprintjs/popover2"; import { CustomClasses } from "../../constants"; import { ZLibrary } from "Types/transforms"; type SelectorProps = SelectProps; const staticProps: Partial & Pick = { filterable: false, itemRenderer: (item, itemProps) => { const { handleClick/*, modifiers: { active }*/ } = itemProps; return ; }, matchTargetWidth: true, popoverProps: { minimal: true, placement: "bottom-right" as Placement, popoverClassName: CustomClasses.POPOVER } }; type OwnProps = { libProps: { currentLibrary: ZLibrary, onSelect: SelectorProps["onItemSelect"], options: SelectorProps["items"] } }; const LibrarySelect = memo(function LibrarySelect({ libProps }){ const { currentLibrary: { path }, onSelect, options } = libProps; return ( items={options} onItemSelect={onSelect} {...staticProps} >