chore(Catalog/Navigation): Added some basic tabs to the subheader grid area

This commit is contained in:
blam
2020-06-05 14:05:01 +02:00
parent e396996792
commit 241dc49797
4 changed files with 82 additions and 70 deletions
@@ -0,0 +1,22 @@
/*
* Copyright 2020 Spotify AB
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import React from 'react';
import { useStarredEntities } from '../../hooks/useStarredEntites';
export const StarredCount: React.FC<{}> = () => {
const { starredEntities } = useStarredEntities();
return <span>{starredEntities.size}</span>;
};
@@ -32,7 +32,15 @@ import {
CatalogFilter,
CatalogFilterItem,
} from '../CatalogFilter/CatalogFilter';
import { Button, makeStyles, Typography, Link } from '@material-ui/core';
import {
Button,
makeStyles,
Typography,
Link,
AppBar,
Tabs,
Tab,
} from '@material-ui/core';
import { filterGroups, defaultFilter } from '../../data/filters';
import { Link as RouterLink } from 'react-router-dom';
import { rootRoute as scaffolderRootRoute } from '@backstage/plugin-scaffolder';
@@ -51,6 +59,7 @@ const useStyles = makeStyles(theme => ({
import { catalogApiRef } from '../..';
import { envelopeToComponent } from '../../data/utils';
import { Component } from '../../data/component';
import { HeaderTabs } from '@backstage/core/src/layout/HeaderTabs';
const CatalogPage: FC<{}> = () => {
const catalogApi = useApi(catalogApiRef);
@@ -113,6 +122,7 @@ const CatalogPage: FC<{}> = () => {
<Header title="Service Catalog" subtitle="Keep track of your software">
<HomepageTimer />
</Header>
<HeaderTabs />
<Content>
<DismissableBanner
variant="info"
@@ -130,6 +140,7 @@ const CatalogPage: FC<{}> = () => {
</Typography>
}
/>
<ContentHeader title="Services">
<Button
component={RouterLink}