diff --git a/packages/frontend/src/components/general/navigation/RouteDrawer.tsx b/packages/frontend/src/components/general/navigation/RouteDrawer.tsx index cee3927..ae21c10 100644 --- a/packages/frontend/src/components/general/navigation/RouteDrawer.tsx +++ b/packages/frontend/src/components/general/navigation/RouteDrawer.tsx @@ -1,4 +1,13 @@ -import { createStyles, List, ListItem, ListItemText, makeStyles, SwipeableDrawer, Theme } from '@material-ui/core'; +import { + createStyles, + List, + ListItem, + ListItemText, + makeStyles, + SwipeableDrawer, + Theme, + ListItemIcon, +} from '@material-ui/core'; import * as React from 'react'; import { Link } from 'react-router-dom'; import { APP_ROUTES, getLinkForRoute, getDisplayNameForRoute } from 'util/routes'; @@ -28,6 +37,7 @@ export const RouteDrawer = (props: RouteDrawerProps) => { {APP_ROUTES.map(route => ( + {route.icon && {route.icon}} diff --git a/packages/types/src/routes/appRoute.type.ts b/packages/types/src/routes/appRoute.type.ts index 2fd581d..14b9a39 100644 --- a/packages/types/src/routes/appRoute.type.ts +++ b/packages/types/src/routes/appRoute.type.ts @@ -14,8 +14,9 @@ export interface AppRoute extends RouteProps { // link text (Human readable!) readonly displayName?: string; + // optional icon displayed next to the link name + readonly icon?: JSX.Element; + // AppRoutes must have a path - deoptionalize this property readonly path: AppPath; - - render(props: any): any; }