diff --git a/src/fireedge/src/client/components/Status/Circle.js b/src/fireedge/src/client/components/Status/Circle.js index 46384e2fba..8c57da2415 100644 --- a/src/fireedge/src/client/components/Status/Circle.js +++ b/src/fireedge/src/client/components/Status/Circle.js @@ -13,59 +13,61 @@ * See the License for the specific language governing permissions and * * limitations under the License. * * ------------------------------------------------------------------------- */ -/* eslint-disable jsdoc/require-jsdoc */ -import { memo } from 'react' +import { memo, forwardRef } from 'react' import PropTypes from 'prop-types' -import { Tooltip, Typography } from '@mui/material' -import makeStyles from '@mui/styles/makeStyles' +import { SvgIcon, Tooltip, Typography } from '@mui/material' -const useStyles = makeStyles({ - circle: ({ color }) => ({ - color, - fill: 'currentColor', - verticalAlign: 'middle', - pointerEvents: 'auto', - }), -}) +// ---------------------------------------- +// Circle SVG +// ---------------------------------------- + +const Circle = forwardRef(({ size, color, ...props }, ref) => ( + + + +)) + +Circle.propTypes = { + color: PropTypes.string, + size: PropTypes.oneOfType([PropTypes.string, PropTypes.number]), +} + +Circle.displayName = 'Circle' + +// ---------------------------------------- +// Status Circle component +// ---------------------------------------- const StatusCircle = memo( - ({ color, tooltip, size }) => { - const classes = useStyles({ color }) - - return ( + ({ color, tooltip, size = 12 }) => + tooltip ? ( {tooltip}} > - + - ) - }, + ) : ( + + ), (prev, next) => prev.color === next.color && prev.tooltip === next.tooltip ) -StatusCircle.propTypes = { - tooltip: PropTypes.string, - color: PropTypes.string, - size: PropTypes.oneOfType([PropTypes.string, PropTypes.number]), -} - -StatusCircle.defaultProps = { - tooltip: undefined, - color: undefined, - size: 12, -} +StatusCircle.propTypes = { tooltip: PropTypes.string, ...Circle.propTypes } StatusCircle.displayName = 'StatusCircle' diff --git a/src/fireedge/src/client/components/Tabs/Vm/Info/information.js b/src/fireedge/src/client/components/Tabs/Vm/Info/information.js index c1b639d1e0..83a76e9f87 100644 --- a/src/fireedge/src/client/components/Tabs/Vm/Info/information.js +++ b/src/fireedge/src/client/components/Tabs/Vm/Info/information.js @@ -88,7 +88,7 @@ const InformationPanel = ({ vm = {}, actions }) => { name: T.State, value: ( - + ),