Expose SystemDiagramCard to material-ui overrides

Signed-off-by: Daniel Ortiz Lira <dortiz@vmware.com>
This commit is contained in:
Daniel Ortiz Lira
2021-09-30 18:40:14 -05:00
parent 56ba9293fa
commit 5091a36ca6
2 changed files with 33 additions and 22 deletions
@@ -46,28 +46,38 @@ import {
import { useApi, useRouteRef } from '@backstage/core-plugin-api';
const useStyles = makeStyles((theme: BackstageTheme) => ({
domainNode: {
fill: theme.palette.primary.main,
stroke: theme.palette.border,
},
systemNode: {
fill: 'coral',
stroke: theme.palette.border,
},
componentNode: {
fill: 'yellowgreen',
stroke: theme.palette.border,
},
apiNode: {
fill: theme.palette.gold,
stroke: theme.palette.border,
},
resourceNode: {
fill: 'grey',
stroke: theme.palette.border,
},
}));
export type SystemDiagramCardClassKey =
| 'domainNode'
| 'systemNode'
| 'componentNode'
| 'apiNode'
| 'resourceNode';
const useStyles = makeStyles(
(theme: BackstageTheme) => ({
domainNode: {
fill: theme.palette.primary.main,
stroke: theme.palette.border,
},
systemNode: {
fill: 'coral',
stroke: theme.palette.border,
},
componentNode: {
fill: 'yellowgreen',
stroke: theme.palette.border,
},
apiNode: {
fill: theme.palette.gold,
stroke: theme.palette.border,
},
resourceNode: {
fill: 'grey',
stroke: theme.palette.border,
},
}),
{ name: 'PluginCatalogSystemDiagramCard' },
);
// Simplifies the diagram output by hiding the default namespace and kind
function readableEntityName(
@@ -15,3 +15,4 @@
*/
export { SystemDiagramCard } from './SystemDiagramCard';
export type { SystemDiagramCardClassKey } from './SystemDiagramCard';