Skip to content

Commit

Permalink
Merge pull request #42 from 001elijah/fix
Browse files Browse the repository at this point in the history
Fix
  • Loading branch information
001elijah authored Jun 27, 2023
2 parents 5a7853c + 4940c30 commit ed55cf2
Show file tree
Hide file tree
Showing 8 changed files with 90 additions and 29 deletions.
15 changes: 14 additions & 1 deletion src/components/ButtonAddColumn/ButtonAddColumn.module.scss
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
@import '../../assets/styles/vars';
@import '../../assets/styles/mixins';

.Button {
margin-bottom: 24px;
display: flex;
justify-content: center;
align-items: center;
width: 335px;
min-width: 335px;
height: 56px;
border-radius: 8px;
cursor: pointer;
Expand Down Expand Up @@ -100,3 +102,14 @@
.Svg {
stroke: inherit;
}

@include tablet {
.Button {
margin-bottom: 52px;
}
}
@include desktop {
.Button {
margin-bottom: 16px;
}
}
2 changes: 0 additions & 2 deletions src/components/Header/Header.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -173,8 +173,6 @@
@include tablet {
.header {
.pageHeader {
// padding-top: 18px;
// padding-bottom: 18px;
padding: 18px 32px;

.burgerMenu {
Expand Down
1 change: 1 addition & 0 deletions src/components/MainBoard/MainBoard.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
background-position: bottom;
height: 100%;
padding-left: 24px;

&.dark {
background-color: #1f1f1f;
}
Expand Down
14 changes: 11 additions & 3 deletions src/components/MainBoard/MainBoard.styled.jsx
Original file line number Diff line number Diff line change
@@ -1,23 +1,31 @@
import styled from 'styled-components';

export const Wrapper = styled.div`
padding-left: 20px;
padding-right: 20px;
background-repeat: no-repeat;
background-size: cover;
background-position: bottom;
background-position: center center;
background-color: ${props => props.colorbg};
height: calc(100% - 86px);
height: calc(100vh - 61px);
@media screen and (min-width: 375px) {
padding-left: 0px;
background-image: url(${props =>
props.BASE_URL + 'mobile/x1/' + props.imgid});
}
@media screen and (min-width: 768px) {
padding-left: 24px;
padding-left: 32px;
padding-right: 32px;
height: calc(100vh - 68px);
background-image: url(${props =>
props.imgurl + 'tablet/x1/' + props.imgid});
}
@media screen and (min-width: 1280px) {
width: calc(100vw - 260px);
height: calc(100% - 76px);
padding-left: 24px;
padding-right: 24px;
background-image: url(${props =>
props.imgurl + 'desktop/x1/' + props.imgid});
}
Expand Down
2 changes: 2 additions & 0 deletions src/components/TaskCard/TaskCard.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
border-radius: 8px;
overflow: hidden;
list-style: none;
margin-top: 4px;
margin-bottom: 4px;

&.dark {
background-color: $black-color;
Expand Down
49 changes: 26 additions & 23 deletions src/components/TaskColumn/TaskColumn.jsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { useSelector } from 'react-redux';
import PropTypes from 'prop-types';
import { TaskCard } from '../TaskCard/TaskCard';
import { AddButton } from '../ButtonAddColumn/ButtonAddColumn';

import { CardModalWindow } from '../CardModalWindow/CardModalWindow';
import { useState } from 'react';
import { useSelector } from 'react-redux';
import { selectCards } from 'redux/Cards/cardsSelectors';
import shortid from 'shortid';
import s from './TaskColumn.module.scss';

export const TaskColumn = ({ columnId }) => {
const [modalOpen, setModalOpen] = useState(false);
Expand All @@ -16,28 +16,32 @@ export const TaskColumn = ({ columnId }) => {
// const columnTasks = cards.length && cards.filter(card => {
// return card.columnId === columnId
// });


// id,
// title,
// description,
// label = 'Low',
// deadline = '26/06/2023',
// boardId,
// columnId,

// id,
// title,
// description,
// label = 'Low',
// deadline = '26/06/2023',
// boardId,
// columnId,
return (
<>
<ul>
{cards.filter(card => {
return card.columnId === columnId
}).map(task => <TaskCard
key={shortid.generate()}
id={task._id}
title={task.title}
label={task.label}
deadline={task.deadline}
boardId={task.boardId}
columnId={task.columnId} />)}
{cards
.filter(card => {
return card.columnId === columnId;
})
.map(task => (
<TaskCard
key={shortid.generate()}
id={task._id}
title={task.title}
label={task.label}
deadline={task.deadline}
boardId={task.boardId}
columnId={task.columnId}
/>
))}
{/* <TaskCard columnId={columnId} /> */}
</ul>
<AddButton
Expand All @@ -58,8 +62,7 @@ export const TaskColumn = ({ columnId }) => {
);
};


TaskColumn.propTypes = {
columnId: PropTypes.string,
boardId: PropTypes.string,
};
};
19 changes: 19 additions & 0 deletions src/components/TaskColumn/TaskColumn.module.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
@import '../../assets/styles/vars';
@import '../../assets/styles/mixins';

.taskCardList {
margin-bottom: 10px;
overflow-y: auto;
max-height: calc(100vh - 280px);
}

@include tablet {
.taskCardList {
max-height: calc(100vh - 290px);
}
}
@include desktop {
.taskCardList {
max-height: calc(100vh - 278px);
}
}
17 changes: 17 additions & 0 deletions src/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -47,3 +47,20 @@ code {
.container {
@include container;
}

::-webkit-scrollbar {
width: 8px;
height: 12px;
margin-left: 8px;
margin-right: 2px;
}

::-webkit-scrollbar-thumb {
background-color: $dark-color;
border-radius: 100vw;
}

::-webkit-scrollbar-track {
background-color: $background-color;
border-radius: 100vw;
}

0 comments on commit ed55cf2

Please sign in to comment.