Skip to content

Commit

Permalink
fix: added new class to spinner and updated action
Browse files Browse the repository at this point in the history
-btn to primary
  • Loading branch information
malmen237 committed Apr 23, 2024
1 parent 89251cd commit 90d6440
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 8 deletions.
8 changes: 7 additions & 1 deletion src/components/loader/loader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,13 @@ const Loading = styled.div`
&.create-production {
position: absolute;
top: 0.5rem;
left: 6rem;
left: 40%;
}
&.manage-production {
position: absolute;
top: 0.5rem;
left: 30%;
}
&.join-production {
Expand Down
14 changes: 7 additions & 7 deletions src/components/manage-productions/manage-productions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { useEffect, useState } from "react";
import styled from "@emotion/styled";
import { DisplayContainerHeader } from "../landing-page/display-container-header";
import {
ActionButton,
PrimaryButton,
DecorativeLabel,
FormInput,
FormLabel,
Expand Down Expand Up @@ -49,7 +49,7 @@ const VerifyButtons = styled.div`
padding: 1rem 0 0 0;
`;

const Button = styled(ActionButton)`
const Button = styled(PrimaryButton)`
margin: 0 1rem 0 0;
`;

Expand Down Expand Up @@ -154,14 +154,14 @@ export const ManageProductions = () => {
<>
<DecorativeLabel>Production name: {production.name}</DecorativeLabel>
{!verifyRemove && (
<ActionButton
<PrimaryButton
type="submit"
className={deleteLoader ? "submit" : ""}
onClick={() => setVerifyRemove(true)}
>
Remove
{deleteLoader && <Spinner className="create-production" />}
</ActionButton>
{deleteLoader && <Spinner className="manage-production" />}
</PrimaryButton>
)}
{verifyRemove && (
<VerifyBtnWrapper>
Expand All @@ -174,7 +174,7 @@ export const ManageProductions = () => {
onClick={handleSubmit(onSubmit)}
>
Yes
{deleteLoader && <Spinner className="create-production" />}
{deleteLoader && <Spinner className="manage-production" />}
</Button>
<Button
type="submit"
Expand All @@ -187,7 +187,7 @@ export const ManageProductions = () => {
}}
>
Go back
{deleteLoader && <Spinner className="create-production" />}
{deleteLoader && <Spinner className="manage-production" />}
</Button>
</VerifyButtons>
</VerifyBtnWrapper>
Expand Down

0 comments on commit 90d6440

Please sign in to comment.