Update APIs

This commit is contained in:
Stefan Ålund
2020-04-17 12:30:54 +02:00
parent 6518657568
commit 09411b0661
2 changed files with 5 additions and 3 deletions
@@ -18,7 +18,7 @@ import React from 'react';
import PropTypes from 'prop-types';
import { IconButton, Tooltip, withStyles } from '@material-ui/core';
import CopyIcon from '@material-ui/icons/FileCopy';
import { errorApiRef, useApi } from '../api';
import { errorApiRef, useApi } from '../../api';
const buttonStyles = theme => ({
button: {
@@ -15,9 +15,10 @@
*/
import React, { FC } from 'react';
import { Tooltip } from '@material-ui/core';
import { Tooltip, useTheme } from '@material-ui/core';
// @ts-ignore
import { Line } from 'rc-progress';
import { BackstageTheme } from '@backstage/theme';
import { getProgressColor } from './CircleProgress';
type Props = {
@@ -35,7 +36,8 @@ const HorizontalProgress: FC<Props> = ({ value }) => {
if (percent > 100) {
percent = 100;
}
const strokeColor = getProgressColor(percent, false, 100);
const theme = useTheme<BackstageTheme>();
const strokeColor = getProgressColor(theme.palette, percent, false, 100);
return (
<Tooltip title={`${percent}%`}>
<Line