diff --git a/packages/gamut/src/RadialProgress/index.tsx b/packages/gamut/src/RadialProgress/index.tsx index 9a1d022561..d9e60feb63 100644 --- a/packages/gamut/src/RadialProgress/index.tsx +++ b/packages/gamut/src/RadialProgress/index.tsx @@ -1,11 +1,10 @@ -import { theme } from '@codecademy/gamut-styles'; -import cx from 'classnames'; +import { css, theme } from '@codecademy/gamut-styles'; +import styled from '@emotion/styled'; import { SVGProps } from 'react'; import * as React from 'react'; +import { FlexBox } from '../Box'; import { Text } from '../Typography'; -// eslint-disable-next-line gamut/no-css-standalone -import styles from './styles.module.scss'; export interface RadialProgressProps extends SVGProps { size?: number | string; @@ -25,6 +24,15 @@ const offsetDelta = offsetForEmptyProgress - offsetForFullProgress; const convertPercentToOffset = (percent: number) => offsetForEmptyProgress - Math.floor(offsetDelta * (percent / 100)); +const RadialProgressWrapper = styled.figure<{ size: number | string }>( + ({ size }) => + css({ + position: 'relative', + height: size, + width: size, + }) +); + /** * @deprecated * This component is deprecated and is no longer supported. @@ -89,10 +97,7 @@ export const RadialProgress: React.FC = ({ const svgViewBoxStr = `${viewBox.minX} ${viewBox.minY} ${viewBox.width} ${viewBox.height}`; return ( -
+ {`${labelPercent}% progress`} = ({ )} - {children &&
{children}
} -
+ {children && ( + + {children} + + )} + ); }; diff --git a/packages/gamut/src/RadialProgress/styles.module.scss b/packages/gamut/src/RadialProgress/styles.module.scss deleted file mode 100644 index dfcb08ca29..0000000000 --- a/packages/gamut/src/RadialProgress/styles.module.scss +++ /dev/null @@ -1,16 +0,0 @@ -@import "~@codecademy/gamut-styles/utils"; - -.radialProgress { - position: relative; -} - -.children { - align-items: center; - display: flex; - height: 100%; - left: 0; - top: 0; - justify-content: center; - position: absolute; - width: 100%; -}