remove even more BackstageTheme usages

Signed-off-by: Fredrik Adelöw <freben@gmail.com>
This commit is contained in:
Fredrik Adelöw
2023-11-20 15:52:05 +01:00
parent dd3517df31
commit 1d7c989db2
100 changed files with 206 additions and 253 deletions
@@ -13,13 +13,14 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { BackstagePalette, BackstageTheme } from '@backstage/theme';
import { makeStyles, useTheme } from '@material-ui/core/styles';
import { Palette } from '@material-ui/core/styles/createPalette';
import Tooltip from '@material-ui/core/Tooltip';
import { Circle } from 'rc-progress';
import React, { useEffect, useState } from 'react';
const useStyles = makeStyles<BackstageTheme>(
const useStyles = makeStyles(
theme => ({
root: {
position: 'relative',
@@ -51,7 +52,7 @@ export type GaugeProps = {
};
export type GaugePropsGetColorOptions = {
palette: BackstagePalette;
palette: Palette;
value: number;
max: number;
};
@@ -78,11 +79,10 @@ export const getProgressColor: GaugePropsGetColor = ({
/**
* Circular Progress Bar
*
*/
export function Gauge(props: GaugeProps) {
const classes = useStyles(props);
const { palette } = useTheme<BackstageTheme>();
const { palette } = useTheme();
const [hoverRef, setHoverRef] = useState<HTMLDivElement | null>(null);
const [open, setOpen] = useState(false);
const { value, max, tooltipDelay, tooltipText } = {