Skip to content

Commit

Permalink
feat: add ButtonLoadingIndicator
Browse files Browse the repository at this point in the history
  • Loading branch information
trevor-anderson committed Feb 20, 2024
1 parent 14b577a commit 36bfec5
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions src/components/Indicators/ButtonLoadingIndicator.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import CircularProgress from "@mui/material/CircularProgress";

/**
* A loading wheel for buttons to use to show loading state (e.g., for form submit btns).
*/
export const ButtonLoadingIndicator = () => (
<CircularProgress
color="inherit"
size={26}
style={{
position: "absolute",
top: "calc(50% - 13px)", // 13px is half the height of the CircularProgress @ size=26
left: "calc(50% - 13px)",
}}
/>
);

0 comments on commit 36bfec5

Please sign in to comment.