Skip to content

Commit

Permalink
make apply button to be sticky to bottom
Browse files Browse the repository at this point in the history
  • Loading branch information
andreymikhadyuk committed Dec 18, 2023
1 parent e1d52a8 commit 062f022
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,16 +48,23 @@
}
}

.submitButtonWrapper {
padding: 1.5rem 0;
display: flex;
justify-content: flex-end;

@include tablet {
padding-bottom: 0;
}
}

.submitButton {
--btn-w: 100%;

max-width: 9.75rem;
margin-top: auto;
align-self: flex-end;

@include tablet {
max-width: 100%;
align-self: unset;
}
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, { FC, ReactElement, useEffect, useState } from "react";
import { useSelector } from "react-redux";
import { selectUser } from "@/pages/Auth/store/selectors";
import { Modal } from "@/shared/components";
import { Modal, ModalFooter } from "@/shared/components";
import { useNotification } from "@/shared/hooks";
import { useStreamLinking } from "@/shared/hooks/useCases";
import { Button, ButtonVariant, Loader } from "@/shared/ui-kit";
Expand Down Expand Up @@ -65,14 +65,18 @@ const LinkSpaceModal: FC<DirectMessageModalProps> = (props) => {
originalCommonId={originalCommonId}
linkedCommonIds={linkedCommonIds}
/>
<Button
className={styles.submitButton}
variant={ButtonVariant.PrimaryPink}
disabled={!activeItemId}
onClick={handleSubmit}
>
Apply
</Button>
<ModalFooter sticky>
<div className={styles.submitButtonWrapper}>
<Button
className={styles.submitButton}
variant={ButtonVariant.PrimaryPink}
disabled={!activeItemId}
onClick={handleSubmit}
>
Apply
</Button>
</div>
</ModalFooter>
</>
);
};
Expand Down

0 comments on commit 062f022

Please sign in to comment.