Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added close button to modal #194

Merged
merged 2 commits into from
Jul 28, 2024
Merged

Conversation

rquazi
Copy link
Member

@rquazi rquazi commented Jul 18, 2024

Added X icon to the form modals and mapping modals to close the modals

@rquazi rquazi requested a review from maariaw July 18, 2024 09:21
Copy link

@maariaw maariaw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works great. Could you still run Prettier and put the "float: right" into a styled component?

{(modalType == ModalType.RegisterNewFull ||
modalType == ModalType.RevisionFull) &&
renderFileDropArea()}
<div id={'modalTop'}></div>
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The indentations are a bit all over the place, maybe run Prettier to get the formatting in order? I don't always remember to do that, but it would be a good habit to do when you've finished developing.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

formatting is fixed

@@ -543,7 +544,8 @@ export default function FormModal({
}

return (
<Modal
<>
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You don't need to add a fragment if you're returning just one element, like here everything is already inside the Modal element. It doesn't have any ill effect, but just reading the code it makes you expect a list of elements.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

</ModalTitle>
</div>
<div className="col-4">
<Button style={{ float: 'right' }} variant="secondaryNoBorder"
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should work towards having all styling done in styled components, so that it's easier to change. Then, when you want to change how a component looks, you can just go to the .styled file of the component and find all style declarations there, instead of some things being inline.

@rquazi rquazi merged commit 8e656e7 into develop Jul 28, 2024
2 checks passed
@rquazi rquazi deleted the CSCFC4EMSCR-426-Adding-X-Button-Modal branch October 16, 2024 08:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants