I've been struggling to figure out how to display a loading indicator on top of my form without messing up the styling...
https://i.sstatic.net/FFCRW.png
My goal is to show the loading indicator when any action, like deleting an item or changing quantity, is triggered in React.js + MobX. I have a boolean flag set up, but placing the loading indicator over the form has proven to be quite challenging.
This is a snippet from the source code of the cart component:
import React, { useEffect, useContext } from "react";
import { Container, Row, Col } from "react-bootstrap";
import PromotionalCode from "./PromotionalCode";
import { observer } from "mobx-react-lite";
import { RootStoreContext } from "../../app/stores/rootStore";
import CartBody from "./CartBody";
import CartSummary from "./CartSummary";
import BasicSpinner from "../../app/common/spinners/BasicSpinner";
import Section from "../../app/common/Page/Section";
import TextContainer from "../../app/common/Page/TextContainer";
// Rest of the code here...
The end goal is something similar to this: https://i.sstatic.net/CNXyK.png
Is there a way to achieve this seamlessly?