File tree Expand file tree Collapse file tree
packages/app/src/components/Root Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ ---
2+ ' @red-hat-developer-hub/backstage-plugin-x2a ' : patch
3+ ---
4+
5+ Icon for the X2A left side menu.
Original file line number Diff line number Diff line change 1+ # https://backstage.io/docs/features/software-catalog/descriptor-format#kind-component
12apiVersion : backstage.io/v1alpha1
23kind : Component
34metadata :
4- name : x2a
5- description : An example of a Backstage application.
6- # Example for optional annotations
7- # annotations:
8- # github.com/project-slug: backstage/backstage
9- # backstage.io/techdocs-ref: dir:.
5+ name : red-hat-developer-hub-x2a-frontend
6+ title : ' @red-hat-developer-hub/backstage-plugin-x2a'
7+ description : Conversion Hub Plugin for Backstage
8+ annotations :
9+ github.com/project-slug : red-hat-developer-hub/backstage-plugins
10+ github.com/team-slug : red-hat-developer-hub/x2a-codeowners
11+ sonarqube.org/project-key : red_hat_developer_hub_plugins
12+ links :
13+ - url : https://github.com/redhat-developer/rhdh-plugins/tree/main/workspaces/x2a/plugins/x2a
14+ title : GitHub Source
15+ icon : source
16+ type : source
1017spec :
11- type : website
12- owner : john@example.com
13- lifecycle : experimental
18+ type : backstage-frontend-plugin
19+ lifecycle : active
20+ owner : x2a-team
21+ system : rhdh
22+ subcomponentOf : rhdh-plugins
Original file line number Diff line number Diff line change @@ -43,7 +43,10 @@ import SearchIcon from '@material-ui/icons/Search';
4343import { MyGroupsSidebarItem } from '@backstage/plugin-org' ;
4444import GroupIcon from '@material-ui/icons/People' ;
4545import { NotificationsSidebarItem } from '@backstage/plugin-notifications' ;
46- import { useX2ATranslation } from '@red-hat-developer-hub/backstage-plugin-x2a' ;
46+ import {
47+ useX2ATranslation ,
48+ X2AIcon ,
49+ } from '@red-hat-developer-hub/backstage-plugin-x2a' ;
4750
4851const useSidebarLogoStyles = makeStyles ( {
4952 root : {
@@ -101,11 +104,7 @@ export const Root = ({ children }: PropsWithChildren<{}>) => {
101104 />
102105 { /* End global nav */ }
103106 < SidebarDivider />
104- < SidebarItem
105- icon = { ExtensionIcon }
106- to = "x2a"
107- text = { t ( 'sidebar.x2a.title' ) }
108- />
107+ < SidebarItem icon = { X2AIcon } to = "x2a" text = { t ( 'sidebar.x2a.title' ) } />
109108 < SidebarScrollWrapper >
110109 { /* Items in this group will be scrollable if they run out of space */ }
111110 </ SidebarScrollWrapper >
Original file line number Diff line number Diff line change @@ -8,6 +8,7 @@ import { BackstagePlugin } from '@backstage/core-plugin-api';
88import { FieldExtensionComponent } from ' @backstage/plugin-scaffolder-react' ;
99import { JSX as JSX_2 } from ' react/jsx-runtime' ;
1010import { RouteRef } from ' @backstage/core-plugin-api' ;
11+ import { SvgIconProps } from ' @material-ui/core/SvgIcon' ;
1112import { TranslationFunction } from ' @backstage/core-plugin-api/alpha' ;
1213import { TranslationRef } from ' @backstage/core-plugin-api/alpha' ;
1314import { TranslationResource } from ' @backstage/core-plugin-api/alpha' ;
@@ -23,6 +24,9 @@ export const useX2ATranslation: () => {
2324 t: TFuncX2A ;
2425};
2526
27+ // @public
28+ export const X2AIcon: (props : SvgIconProps ) => JSX_2 .Element ;
29+
2630// @public (undocumented)
2731export const X2APage: () => JSX_2 .Element ;
2832
Original file line number Diff line number Diff line change 1+ /*
2+ * Copyright Red Hat, Inc.
3+ *
4+ * Licensed under the Apache License, Version 2.0 (the "License");
5+ * you may not use this file except in compliance with the License.
6+ * You may obtain a copy of the License at
7+ *
8+ * http://www.apache.org/licenses/LICENSE-2.0
9+ *
10+ * Unless required by applicable law or agreed to in writing, software
11+ * distributed under the License is distributed on an "AS IS" BASIS,
12+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+ * See the License for the specific language governing permissions and
14+ * limitations under the License.
15+ */
16+
17+ import SvgIcon , { SvgIconProps } from '@material-ui/core/SvgIcon' ;
18+ /**
19+ * Application icon (for the left side menu)
20+ *
21+ * @public
22+ */
23+ export const X2AIcon = ( props : SvgIconProps ) => (
24+ < SvgIcon viewBox = "0 -960 960 960" { ...props } >
25+ < path d = "M400-280h160v-80H400v80Zm0-160h280v-80H400v80ZM280-600h400v-80H280v80Zm200 120ZM80-80v-80h102q-48-23-77.5-68T75-330q0-79 55.5-134.5T265-520v80q-45 0-77.5 32T155-330q0 39 24 69t61 38v-97h80v240H80Zm320-40v-80h360v-560H200v160h-80v-160q0-33 23.5-56.5T200-840h560q33 0 56.5 23.5T840-760v560q0 33-23.5 56.5T760-120H400Z" />
26+ </ SvgIcon >
27+ ) ;
Original file line number Diff line number Diff line change @@ -19,3 +19,4 @@ export {
1919 useTranslation as useX2ATranslation ,
2020 type TFuncX2A ,
2121} from './hooks/useTranslation' ;
22+ export { X2AIcon } from './components/x2aIcon' ;
You can’t perform that action at this time.
0 commit comments