diff --git a/plugins/tech-radar/src/components/RadarBubble/RadarBubble.css b/plugins/tech-radar/src/components/RadarBubble/RadarBubble.css deleted file mode 100644 index 5cfb09fd13..0000000000 --- a/plugins/tech-radar/src/components/RadarBubble/RadarBubble.css +++ /dev/null @@ -1,26 +0,0 @@ -.bubble, -.visibleBubble { - pointer-events: none; - user-select: none; - opacity: 0; -} - -.visibleBubble { - opacity: 0.8; -} - -.background { - fill: #333; -} - -.text { - font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', - 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', - sans-serif; - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; - pointer-events: none; - user-select: none; - font-size: 10px; - fill: #fff; -} diff --git a/plugins/tech-radar/src/components/RadarBubble/RadarBubble.js b/plugins/tech-radar/src/components/RadarBubble/RadarBubble.js index 88d5306aba..072f80ca20 100644 --- a/plugins/tech-radar/src/components/RadarBubble/RadarBubble.js +++ b/plugins/tech-radar/src/components/RadarBubble/RadarBubble.js @@ -16,9 +16,31 @@ import React from 'react'; import PropTypes from 'prop-types'; -import styles from './RadarBubble.css'; +import { withStyles } from '@material-ui/core'; -export default class RadarBubble extends React.PureComponent { +const styles = { + bubble: { + pointerEvents: 'none', + userSelect: 'none', + opacity: 0, + }, + visibleBubble: { + pointerEvents: 'none', + userSelect: 'none', + opacity: 0.8, + }, + background: { + fill: '#333', + }, + text: { + pointerEvents: 'none', + userSelect: 'none', + fontSize: '10px', + fill: '#fff', + }, +}; + +class RadarBubble extends React.PureComponent { componentDidMount() { this._updatePosition(); } @@ -64,22 +86,27 @@ export default class RadarBubble extends React.PureComponent { } render() { - const { visible, text } = this.props; + const { visible, text, classes } = this.props; return ( - - + + {text} ); @@ -91,4 +118,7 @@ RadarBubble.propTypes = { text: PropTypes.string.isRequired, x: PropTypes.number.isRequired, y: PropTypes.number.isRequired, + classes: PropTypes.object.isRequired, }; + +export default withStyles(styles)(RadarBubble);