Skip to content

Commit

Permalink
Switch to using classNames and CSS modules for performance
Browse files Browse the repository at this point in the history
  • Loading branch information
samau3 committed Oct 21, 2024
1 parent 92184ca commit d105694
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 7 deletions.
13 changes: 6 additions & 7 deletions client/src/pages/patients/register/inputs/RegisterPhysician.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ import { useMutation } from '@tanstack/react-query';
import LifelineAPI from '../../LifelineAPI.js';
import { StatusCodes } from 'http-status-codes';

import classes from './RegisterPhysician.module.css';

const registerPhysicianProps = {
setPhysician: PropTypes.func.isRequired,
registerPhysicianOpened: PropTypes.bool.isRequired,
Expand Down Expand Up @@ -180,26 +182,23 @@ export default function RegisterPhysician({
<Modal
opened={confirmationModalOpened}
onClose={closeConfirmationModal}
styles={{
title: {
fontSize: '1.2rem',
fontWeight: 600,
},
classNames={{
title: classes.title,
}}
title="This form has unsaved changes."
yOffset="16vh"
>
<p>Are you sure you want to close this form without submitting?</p>
<Button
style={{ marginTop: '1rem' }}
classNames={{ root: classes.button }}
color="red"
fullWidth
onClick={() => confirmClose(true)}
>
Yes
</Button>
<Button
style={{ marginTop: '1rem' }}
classNames={{ root: classes.button }}
color="blue"
fullWidth
onClick={closeConfirmationModal}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
.title {
font-size: 1.2rem;
font-weight: 600;
}

.button {
margin-top: 1rem;
}

0 comments on commit d105694

Please sign in to comment.