Skip to content
Snippets Groups Projects
Unverified Commit ef7422f9 authored by Jack Reed's avatar Jack Reed Committed by GitHub
Browse files

Merge pull request #3144 from ProjectMirador/sidebar-buttons

Handle sidebar buttons within the tab component
parents b6ca9840 31fba51d
No related branches found
No related tags found
No related merge requests found
......@@ -22,14 +22,13 @@
</div>
);
const AddPluginComponentB = ({TabButton, PluginComponents, dispatch, ...otherProps}) => (
<TabButton id="add-plugin-companion-window-button" {...otherProps} label="P" value="pluginComponentA" />
const AddPluginComponentB = () => (
<span id="add-plugin-companion-window-button">Plugin</span>
);
AddPluginComponentB.value = 'pluginComponentA';
const addPluginA = {
target: 'CompanionWindowFactory',
companionWindowKey: 'pluginComponentA',
mode: 'add',
component: AddPluginComponentA,
};
......
......@@ -9,7 +9,6 @@ import AnnotationIcon from '@material-ui/icons/CommentSharp';
import AttributionIcon from '@material-ui/icons/CopyrightSharp';
import LayersIcon from '@material-ui/icons/LayersSharp';
import SearchIcon from '@material-ui/icons/SearchSharp';
import { PluginHook } from './PluginHook';
import CanvasIndexIcon from './icons/CanvasIndexIcon';
/**
*
......@@ -125,7 +124,15 @@ export class WindowSideBarButtons extends Component {
)}
/>
)}
<PluginHook TabButton={TabButton} PluginComponents={PluginComponents} />
{ PluginComponents
&& PluginComponents.map(PluginComponent => (
<TabButton
key={PluginComponent.value}
value={PluginComponent.value}
icon={<PluginComponent />}
/>
))
}
</Tabs>
);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment