feat(scaffolder): Use more distinguishable icons for link and text output
Use more distinguishable icons for link (`Link`) and text output (`Description`). Currently, both use the same icon `Web` (until specified explicitly at the template). For a user, it is not really clear which of these will open more output below it vs open a URL/a new tab. Signed-off-by: Patrick Jungermann <Patrick.Jungermann@gmail.com>
This commit is contained in:
@@ -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 (
|
||||
<>
|
||||
|
||||
Reference in New Issue
Block a user