Merge pull request #22494 from Bonial-International-GmbH/pjungermann/scaffolder/output-icons

feat(scaffolder): Use more distinguishable icons for link and text output
This commit is contained in:
Ben Lambert
2024-01-29 09:59:58 +01:00
committed by GitHub
3 changed files with 9 additions and 4 deletions
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/plugin-scaffolder-react': minor
---
Use more distinguishable icons for link (`Link`) and text output (`Description`).
@@ -17,7 +17,7 @@ import { IconComponent, useApp, useRouteRef } from '@backstage/core-plugin-api';
import { entityRouteRef } from '@backstage/plugin-catalog-react';
import { Button, makeStyles } from '@material-ui/core';
import React from 'react';
import WebIcon from '@material-ui/icons/Web';
import LinkIcon from '@material-ui/icons/Link';
import { parseEntityRef } from '@backstage/catalog-model';
import { Link } from '@backstage/core-components';
import { ScaffolderTaskOutput } from '../../../api';
@@ -37,7 +37,7 @@ export const LinkOutputs = (props: { output: ScaffolderTaskOutput }) => {
const entityRoute = useRouteRef(entityRouteRef);
const iconResolver = (key?: string): IconComponent =>
app.getSystemIcon(key!) ?? WebIcon;
app.getSystemIcon(key!) ?? LinkIcon;
return (
<>
@@ -15,7 +15,7 @@
*/
import { IconComponent, useApp } from '@backstage/core-plugin-api';
import { Button } from '@material-ui/core';
import WebIcon from '@material-ui/icons/Web';
import DescriptionIcon from '@material-ui/icons/Description';
import React from 'react';
import { ScaffolderTaskOutput } from '../../../api';
@@ -33,7 +33,7 @@ export const TextOutputs = (props: {
const app = useApp();
const iconResolver = (key?: string): IconComponent =>
app.getSystemIcon(key!) ?? WebIcon;
app.getSystemIcon(key!) ?? DescriptionIcon;
return (
<>