Skip to content

Commit

Permalink
Merge pull request #540 from codeforpdx/issue-503/pill-buttons
Browse files Browse the repository at this point in the history
Issue 503/pill buttons
  • Loading branch information
xscottxbrownx authored Nov 26, 2023
2 parents aabe27f + 755ee2c commit 8586b51
Show file tree
Hide file tree
Showing 16 changed files with 65 additions and 210 deletions.
3 changes: 1 addition & 2 deletions src/components/Home/HomeSection.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,7 @@ const HomeSection = ({
sx={{
my: '1rem',
backgroundColor: 'primary.light',
width: isReallySmallScreen ? 1 : 1 / 4,
borderRadius: '25px'
width: isReallySmallScreen ? 1 : 1 / 4
}}
>
{button}
Expand Down
1 change: 0 additions & 1 deletion src/components/Messages/MessageButtonGroup.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ const MessageButtonGroup = ({ showModal, setShowModal, boxType, setBoxType }) =>
onClick={() => setShowModal(!showModal)}
startIcon={<CreateIcon />}
color="secondary"
sx={{ width: isReallySmallScreen ? '200px' : 'default' }}
>
New Message
</Button>
Expand Down
7 changes: 5 additions & 2 deletions src/components/Messages/MessageFolder.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import useMediaQuery from '@mui/material/useMediaQuery';
import { useTheme } from '@mui/material/styles';
// Component Imports
import MessagePreview from './MessagePreview';
import { PaginationContainer } from './MessageStyles';
import PaginationContainer from './PaginationStyles';
import { EmptyListNotification, LoadingAnimation } from '../Notification';

/**
Expand Down Expand Up @@ -82,7 +82,10 @@ const MessageFolder = ({ folderType, handleRefresh, loadMessages, messageList =
variant="contained"
onClick={() => handleRefresh(folderType)}
type="button"
sx={{ width: '120px', margin: isSmallScreen ? '10px 20px' : '10px' }}
sx={{
width: '120px',
margin: isSmallScreen ? '10px 20px' : '10px'
}}
startIcon={<RotateLeftOutlinedIcon />}
>
Refresh
Expand Down
174 changes: 0 additions & 174 deletions src/components/Messages/MessageStyles.js

This file was deleted.

48 changes: 48 additions & 0 deletions src/components/Messages/PaginationStyles.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
import styled from 'styled-components';

const PaginationContainer = styled.div`
.pagination {
display: flex;
justify-content: center;
align-items: center;
padding: 0;
list-style-type: none;
gap: 3px;
}
.page-green,
.page-red {
color: #fff;
font-weight: bold;
padding: 8px 12px;
border-radius: 4px;
text-decoration: none;
cursor: pointer;
display: flex;
}
.page-green {
background-color: #74b0a8;
&:hover {
background-color: #017969;
}
}
.page-red {
background-color: #bf7c84;
&:hover {
background-color: #961020;
}
}
.chevron {
margin: 0 1rem;
}
.active-page {
background-color: #017969;
cursor: default;
}
`;

export default PaginationContainer;
2 changes: 0 additions & 2 deletions src/components/Modals/AddContactModal.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,6 @@ const AddContactModal = ({ addContact, showAddContactModal, setShowAddContactMod
endIcon={<ClearIcon />}
onClick={() => setShowAddContactModal(false)}
fullWidth
sx={{ borderRadius: '20px' }}
>
Cancel
</Button>
Expand All @@ -179,7 +178,6 @@ const AddContactModal = ({ addContact, showAddContactModal, setShowAddContactMod
endIcon={<CheckIcon />}
type="submit"
fullWidth
sx={{ borderRadius: '20px' }}
>
Add Contact
</Button>
Expand Down
1 change: 0 additions & 1 deletion src/components/Modals/ConfirmationButton.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ const ConfirmationButton = ({ title, confirmFunction, processing }) => (
onClick={confirmFunction}
disabled={processing}
fullWidth
sx={{ borderRadius: '20px' }}
>
{title}
</Button>
Expand Down
1 change: 0 additions & 1 deletion src/components/Modals/ConfirmationModal.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,6 @@ const ConfirmationModal = ({
endIcon={<ClearIcon />}
onClick={() => setShowConfirmationModal(false)}
fullWidth
sx={{ borderRadius: '20px' }}
>
Cancel
</Button>
Expand Down
2 changes: 0 additions & 2 deletions src/components/Modals/NewMessageModal.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,6 @@ const NewMessageModal = ({ showModal, setShowModal, oldMessage = '', toField = '
startIcon={<ClearIcon />}
onClick={() => setShowModal(false)}
fullWidth
sx={{ borderRadius: '20px' }}
>
Cancel
</Button>
Expand All @@ -226,7 +225,6 @@ const NewMessageModal = ({ showModal, setShowModal, oldMessage = '', toField = '
color="primary"
startIcon={<CheckIcon />}
fullWidth
sx={{ borderRadius: '20px' }}
>
Submit
</Button>
Expand Down
2 changes: 0 additions & 2 deletions src/components/Modals/SetAclPermissionsModal.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,6 @@ const SetAclPermissionsModal = ({ showModal, setShowModal, dataset }) => {
startIcon={<ClearIcon />}
onClick={clearInputFields}
fullWidth
sx={{ borderRadius: '20px' }}
>
Cancel
</Button>
Expand All @@ -166,7 +165,6 @@ const SetAclPermissionsModal = ({ showModal, setShowModal, dataset }) => {
color="primary"
startIcon={<ShareIcon />}
fullWidth
sx={{ borderRadius: '20px' }}
>
{permissionState.permissionType ? `${permissionState.permissionType}` : 'Share'}
</Button>
Expand Down
2 changes: 0 additions & 2 deletions src/components/Modals/UploadButtonGroup.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ const UploadButtonGroup = ({ file, setFile }) => {
fullWidth
required
startIcon={<SearchIcon />}
sx={{ borderRadius: '20px' }}
>
Choose file
<input
Expand All @@ -65,7 +64,6 @@ const UploadButtonGroup = ({ file, setFile }) => {
fullWidth
required
startIcon={<PhotoCameraIcon />}
sx={{ borderRadius: '20px' }}
>
Capture image
<input type="file" hidden accept="image/*" capture="environment" />
Expand Down
2 changes: 0 additions & 2 deletions src/components/Modals/UploadDocumentModal.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,6 @@ const UploadDocumentModal = ({ showModal, setShowModal }) => {
startIcon={<ClearIcon />}
onClick={clearInputFields}
fullWidth
sx={{ borderRadius: '20px' }}
>
Cancel
</Button>
Expand All @@ -186,7 +185,6 @@ const UploadDocumentModal = ({ showModal, setShowModal }) => {
color="primary"
startIcon={<FileUploadIcon />}
fullWidth
sx={{ borderRadius: '20px' }}
>
Upload
</Button>
Expand Down
8 changes: 1 addition & 7 deletions src/components/NavBar/NavbarLoggedOut.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,7 @@ const NavbarLoggedOut = () => {
</Link>
{isSmallScreen ? (
<>
<Button
variant="contained"
color="secondary"
size="large"
sx={{ borderRadius: '20px' }}
onClick={handleSignIn}
>
<Button variant="contained" color="secondary" size="large" onClick={handleSignIn}>
Sign In
</Button>
<SignInModal
Expand Down
2 changes: 0 additions & 2 deletions src/components/NavBar/OidcLoginComponent.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,6 @@ const OidcLoginComponent = ({ setShowSignInModal }) => {
color="error"
onClick={() => setShowSignInModal(false)}
fullWidth
sx={{ borderRadius: '20px' }}
>
Cancel
</Button>
Expand All @@ -123,7 +122,6 @@ const OidcLoginComponent = ({ setShowSignInModal }) => {
size={isSmallScreen ? '' : 'large'}
onClick={() => loginHandler()}
fullWidth={isSmallScreen}
sx={{ borderRadius: '20px' }}
>
Login
</Button>
Expand Down
Loading

0 comments on commit 8586b51

Please sign in to comment.