Skip to content

Commit

Permalink
feat(odyssey-react): refactor CircularLoadIndicator to use Box
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewberg-okta committed Jan 3, 2022
1 parent b312f94 commit d0d4666
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,13 @@ import React, { forwardRef } from "react";
import type { ComponentPropsWithRef } from "react";
import { withTheme } from "@okta/odyssey-react-theme";
import { useOid, useOmit } from "../../utils";
import { Box } from "../Box";
import styles from "./CircularLoadIndicator.module.scss";

export interface CircularLoadIndicatorProps
extends Omit<
ComponentPropsWithRef<"span">,
"style" | "className" | "role" | "aria-valuemin" | "aria-valuemax"
"style" | "className" | "role" | "aria-valuemin" | "aria-valuemax" | "color"
> {
/**
* Id used to reference the indicator in loading element's `aria-describedby` attribute
Expand Down Expand Up @@ -57,7 +58,8 @@ export const CircularLoadIndicator = withTheme(
const omitProps = useOmit(rest);
const internalId = useOid();
return (
<span
<Box
as="span"
{...omitProps}
className={styles.root}
role="progressbar"
Expand All @@ -84,7 +86,7 @@ export const CircularLoadIndicator = withTheme(
fill="none"
></circle>
</svg>
</span>
</Box>
);
})
);
Expand Down

0 comments on commit d0d4666

Please sign in to comment.