feat: consume theme provided by Page theme provider
This commit is contained in:
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
import { customPageTheme } from '@backstage/theme';
|
||||
import { BackstageTheme } from '@backstage/theme';
|
||||
import React from 'react';
|
||||
import {
|
||||
Content,
|
||||
@@ -27,9 +27,10 @@ import { useAsync } from 'react-use';
|
||||
import 'graphiql/graphiql.css';
|
||||
import { graphQlBrowseApiRef } from '../../lib/api';
|
||||
import { GraphiQLBrowser } from '../GraphiQLBrowser';
|
||||
import { Typography } from '@material-ui/core';
|
||||
import { Typography, useTheme } from '@material-ui/core';
|
||||
|
||||
export const GraphiQLPage = () => {
|
||||
const backstageTheme = useTheme<BackstageTheme>();
|
||||
const graphQlBrowseApi = useApi(graphQlBrowseApiRef);
|
||||
const endpoints = useAsync(() => graphQlBrowseApi.getEndpoints());
|
||||
|
||||
@@ -59,7 +60,11 @@ export const GraphiQLPage = () => {
|
||||
}
|
||||
|
||||
return (
|
||||
<Page pageTheme={customPageTheme.pageTheme.tool}>
|
||||
<Page
|
||||
theme={backstageTheme.getPageTheme({
|
||||
themeId: 'tool',
|
||||
})}
|
||||
>
|
||||
<Header title="GraphiQL">
|
||||
<HeaderLabel label="Owner" value="Spotify" />
|
||||
<HeaderLabel label="Lifecycle" value="Alpha" />
|
||||
|
||||
Reference in New Issue
Block a user