Skip to content
This repository has been archived by the owner on Jul 12, 2022. It is now read-only.

Add responsiveness to change password modal #1171

Merged
merged 2 commits into from
May 7, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions ui/src/modules/Account/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,9 @@ const Account = () => {

const renderModal = () =>
toggleModal && (
<Modal.Default onClose={() => setToggleModal(false)}>
<Styled.Modal.Default onClose={() => setToggleModal(false)}>
<ChangePassword onSubmit={() => setToggleModal(false)} />
</Modal.Default>
</Styled.Modal.Default>
);

const renderContent = () => (
Expand Down
16 changes: 16 additions & 0 deletions ui/src/modules/Account/styled.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import Text from 'core/components/Text';
import FormComponent from 'core/components/Form';
import { slideInLeft, fadeIn } from 'core/assets/style/animate';
import CheckPass from 'core/components/CheckPassword';
import ComponentModal from 'core/components/Modal';

const Wrapper = styled.div`
animation: 0.2s ${slideInLeft} linear;
Expand Down Expand Up @@ -66,6 +67,20 @@ const Actions = styled.div`
}
`;

const Modal = styled(ComponentModal.Default)`
.modal-container {
max-height: 550px;
padding-right: 25px;
bottom: 100px;
}

.modal-content {
overflow-y: auto;
padding-right: 10px;
max-height: 500px;
}
`;

const ChangePassword = styled.form`
width: 320px;
`;
Expand Down Expand Up @@ -116,6 +131,7 @@ export default {
ChangePassword,
Password,
Modal: {
Default: Modal,
Subtitle: ModalSubtitle,
Info: ModalInfo
},
Expand Down