Skip to content

Commit

Permalink
fix: updated btn-names to primary or secondary
Browse files Browse the repository at this point in the history
  • Loading branch information
malmen237 committed Apr 23, 2024
1 parent e5d63d4 commit 89251cd
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 17 deletions.
11 changes: 6 additions & 5 deletions src/components/landing-page/create-production.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ import {
FormInput,
FormLabel,
StyledWarningMessage,
ActionButton,
PrimaryButton,
SecondaryButton,
} from "./form-elements.tsx";
import { API } from "../../api/api.ts";
import { useGlobalState } from "../../global-state/context-provider.tsx";
Expand Down Expand Up @@ -170,18 +171,18 @@ export const CreateProduction = () => {
/>
</div>
))}
<ActionButton type="button" onClick={() => append({ name: "" })}>
<SecondaryButton type="button" onClick={() => append({ name: "" })}>
Add Line
</ActionButton>
</SecondaryButton>

<ActionButton
<PrimaryButton
type="submit"
className={loading ? "with-loader" : ""}
onClick={handleSubmit(onSubmit)}
>
Create Production
{loading && <Spinner className="create-production" />}
</ActionButton>
</PrimaryButton>
{createdProductionId !== null && (
<ProductionConfirmation>
The production ID is: {createdProductionId.toString()}
Expand Down
6 changes: 3 additions & 3 deletions src/components/landing-page/join-production.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {
FormContainer,
FormInput,
FormSelect,
ActionButton,
PrimaryButton,
StyledWarningMessage,
} from "./form-elements.tsx";
import { useGlobalState } from "../../global-state/context-provider.tsx";
Expand Down Expand Up @@ -242,13 +242,13 @@ export const JoinProduction = ({ preSelected }: TProps) => {
</FormLabel>
)}

<ActionButton
<PrimaryButton
type="submit"
disabled={!isValid}
onClick={handleSubmit(onSubmit)}
>
Join
</ActionButton>
</PrimaryButton>
</>
)}
</FormContainer>
Expand Down
6 changes: 3 additions & 3 deletions src/components/landing-page/manage-production-button.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { useNavigate } from "react-router-dom";
import styled from "@emotion/styled";
import { ActionButton } from "./form-elements";
import { PrimaryButton } from "./form-elements";

const ButtonWrapper = styled.div`
display: flex;
Expand All @@ -13,12 +13,12 @@ export const ManageProductionButton = () => {

return (
<ButtonWrapper>
<ActionButton
<PrimaryButton
type="button"
onClick={() => navigate("/manage-productions")}
>
Manage Productions
</ActionButton>
</PrimaryButton>
</ButtonWrapper>
);
};
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import styled from "@emotion/styled";
import { useNavigate } from "react-router-dom";
import { BackArrow } from "../../assets/icons/icon";
import { ActionButton } from "../landing-page/form-elements";
import { PrimaryButton } from "../landing-page/form-elements";

const StyledBackBtn = styled(ActionButton)`
const StyledBackBtn = styled(PrimaryButton)`
padding: 0;
margin: 0;
width: 4rem;
Expand Down
4 changes: 2 additions & 2 deletions src/components/production-line/long-press-to-talk-button.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import { useEffect, useState } from "react";
import styled from "@emotion/styled";
import { ActionButton } from "../landing-page/form-elements";
import { PrimaryButton } from "../landing-page/form-elements";
import { isMobile } from "../../bowser";

type TLongPressToTalkButton = {
setMicMute: (input: boolean) => void;
};

const Button = styled(ActionButton)`
const Button = styled(PrimaryButton)`
position: relative;
&.active-btn {
Expand Down
4 changes: 2 additions & 2 deletions src/components/production-line/production-line.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { useGlobalState } from "../../global-state/context-provider.tsx";
import { useAudioInput } from "./use-audio-input.ts";
import { useRtcConnection } from "./use-rtc-connection.ts";
import { useEstablishSession } from "./use-establish-session.ts";
import { ActionButton } from "../landing-page/form-elements.tsx";
import { PrimaryButton } from "../landing-page/form-elements.tsx";
import { UserList } from "./user-list.tsx";
import {
MicMuted,
Expand Down Expand Up @@ -49,7 +49,7 @@ const ButtonIcon = styled.div`
margin: 0 0.5rem 0 0;
`;

const UserControlBtn = styled(ActionButton)`
const UserControlBtn = styled(PrimaryButton)`
line-height: 2;
min-width: 12rem;
text-align: left;
Expand Down

0 comments on commit 89251cd

Please sign in to comment.