Add configurable gradient property to backstage theme

Signed-off-by: Benjamin <benjamin.mccain@onepeloton.com>
This commit is contained in:
Benjamin
2021-08-10 12:56:25 -04:00
parent 6dfbd312cd
commit 6b1afe8c00
5 changed files with 19 additions and 3 deletions
+6
View File
@@ -0,0 +1,6 @@
---
'@backstage/core-components': patch
'@backstage/theme': patch
---
Add a configurable `palette.bursts.gradient` property to the Backstage theme, to support customizing the gradients in the `ItemCard` header.
+1
View File
@@ -28,6 +28,7 @@ import { LinkProps as LinkProps_2 } from '@material-ui/core';
import { LinkProps as LinkProps_3 } from 'react-router-dom';
import { MaterialTableProps } from '@material-table/core';
import { NavLinkProps } from 'react-router-dom';
import { Palette } from '@material-ui/core/styles/createPalette';
import { ProfileInfoApi } from '@backstage/core-plugin-api';
import { PropsWithChildren } from 'react';
import PropTypes from 'prop-types';
@@ -17,18 +17,18 @@
import {
createStyles,
makeStyles,
Theme,
Typography,
WithStyles,
} from '@material-ui/core';
import React from 'react';
import { BackstageTheme } from '../../../../theme/src';
const styles = (theme: Theme) =>
const styles = (theme: BackstageTheme) =>
createStyles({
root: {
color: theme.palette.common.white,
padding: theme.spacing(2, 2, 3),
backgroundImage: 'linear-gradient(-137deg, #4BB8A5 0%, #187656 100%)',
backgroundImage: theme.palette.bursts.gradient.linear,
backgroundPosition: 0,
backgroundSize: 'inherit',
},
+6
View File
@@ -38,6 +38,9 @@ export const lightTheme = createTheme({
backgroundColor: {
default: '#7C3699',
},
gradient: {
linear: 'linear-gradient(-137deg, #4BB8A5 0%, #187656 100%)',
},
},
primary: {
main: '#2E77D0',
@@ -100,6 +103,9 @@ export const darkTheme = createTheme({
backgroundColor: {
default: '#7C3699',
},
gradient: {
linear: 'linear-gradient(-137deg, #4BB8A5 0%, #187656 100%)',
},
},
primary: {
main: '#9CC9FF',
+3
View File
@@ -58,6 +58,9 @@ type PaletteAdditions = {
backgroundColor: {
default: string;
};
gradient: {
linear: string;
};
};
pinSidebarButton: {
icon: string;