Skip to content

Commit

Permalink
Add responsiviness to TaskList
Browse files Browse the repository at this point in the history
  • Loading branch information
negreirosleo committed Nov 13, 2023
1 parent d3a3085 commit 6e6c091
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 6 deletions.
3 changes: 1 addition & 2 deletions frontend/src/app/tasks/TaskForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,7 @@ export const TaskForm = ({ projects, taskTypes, userId }: TaskFormProps) => {
handleSubmit()
}}
component="form"
maxWidth="558px"
margin="0 auto"
sx={{ maxWidth: { xs: '100%', sm: '558px' } }}
gap="16px"
ref={formRef}
>
Expand Down
9 changes: 7 additions & 2 deletions frontend/src/app/tasks/TaskList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,19 @@ export const TaskList = ({ userId }: TaskListProps) => {
return (
<Box
component="ul"
sx={{ width: '558px', display: 'flex', flexDirection: 'column', gap: '16px' }}
sx={{
maxWidth: { xs: '100%', sm: '558px' },
display: 'flex',
flexDirection: 'column',
gap: '16px'
}}
>
{tasks.map((task) => (
<Box
sx={{
backgroundColor: '#A8AEEB',
height: '96px',
width: '558px',
width: { xs: '100%', sm: '558px' },
display: 'flex',
flexDirection: 'column',
borderRadius: '8px',
Expand Down
5 changes: 3 additions & 2 deletions frontend/src/app/tasks/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,11 @@ export default async function Tasks() {
<Box
sx={{
display: 'flex',
flexDirection: 'row',
flexDirection: { xs: 'column', sm: 'row' },
margin: '0 auto',
gap: '30px',
justifyContent: 'center'
justifyContent: 'center',
padding: { xs: '0 8px', sm: 0 }
}}
>
<TaskForm projects={projects} taskTypes={taskTypes} userId={currentUser.id} />
Expand Down

0 comments on commit 6e6c091

Please sign in to comment.