X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/dd63f92a03fc9cbd8b76369b71ceed93046fa6f0..83702e6506b400c5a00ee929a707f61ccd5d6ac0:/src/plugins/example/index.tsx diff --git a/src/plugins/example/index.tsx b/src/plugins/example/index.tsx index 6e2b1deedb..36647fac3d 100644 --- a/src/plugins/example/index.tsx +++ b/src/plugins/example/index.tsx @@ -9,7 +9,7 @@ import * as React from 'react'; import { Dispatch } from 'redux'; import { RootState } from '~/store/store'; import { push } from "react-router-redux"; -import { Typography } from "@material-ui/core"; +import { Card, CardContent, Typography } from "@material-ui/core"; import { Route, matchPath } from "react-router"; import { RootStore } from '~/store/store'; import { activateSidePanelTreeItem } from '~/store/side-panel-tree/side-panel-tree-actions'; @@ -26,6 +26,7 @@ const propertyKey = "Example_menu_item_pressed_count"; interface ExampleProps { pressedCount: number; + className?: string; } const exampleMapStateToProps = (state: RootState) => ({ pressedCount: state.properties[propertyKey] || 0 }); @@ -35,15 +36,19 @@ const incrementPressedCount = (dispatch: Dispatch, pressedCount: number) => { }; const ExampleMenuComponent = connect(exampleMapStateToProps)( - ({ pressedCount, dispatch }: ExampleProps & DispatchProp) => - incrementPressedCount(dispatch, pressedCount)}>Example menu item + ({ pressedCount, dispatch, className }: ExampleProps & DispatchProp) => + incrementPressedCount(dispatch, pressedCount)}>Example menu item ); const ExamplePluginMainPanel = connect(exampleMapStateToProps)( ({ pressedCount }: ExampleProps) => - - This is a example main panel plugin. The example menu item has been pressed {pressedCount} times. - ); + + + + This is a example main panel plugin. The example menu item has been pressed {pressedCount} times. + + + ); export const register = (pluginConfig: PluginConfig) => { @@ -52,13 +57,13 @@ export const register = (pluginConfig: PluginConfig) => { return elms; }); - pluginConfig.accountMenuList.push((elms) => { - elms.push(); + pluginConfig.accountMenuList.push((elms, menuItemClass) => { + elms.push(); return elms; }); - pluginConfig.newButtonMenuList.push((elms) => { - elms.push(); + pluginConfig.newButtonMenuList.push((elms, menuItemClass) => { + elms.push(); return elms; });