diff --git a/src/components/TransactionsList/TransactionDashboard/TransactionDashboard.styled.js b/src/components/TransactionsList/TransactionDashboard/TransactionDashboard.styled.js index 51dffd6..1b17549 100644 --- a/src/components/TransactionsList/TransactionDashboard/TransactionDashboard.styled.js +++ b/src/components/TransactionsList/TransactionDashboard/TransactionDashboard.styled.js @@ -5,11 +5,15 @@ export const StyledThead = styled.tr` display: flex; justify-content: space-between; align-items: center; - + width: 704px; height: 56px; padding: 20px 0px 20px 16px; border-radius: 8px; background: rgba(82, 59, 126, 0.8); + + @media screen and (min-width: 1280px) { + width: 715px; + } `; export const StyledTheadItem = styled.th` @@ -23,26 +27,13 @@ export const StyledTheadItem = styled.th` width: 120px; } `; -export const StyledTable = styled.table` - width: 704px; - margin: 0 auto; - margin-top: 20px; - - @media screen and (min-width: 1280px) { - width: 715px; - padding-left: 59px; - padding-right: 16px; - margin-top: 46px; - } -`; +export const StyledTable = styled.table``; export const WrapTable = styled.div` - width: 706px; overflow-x: hidden; overflow-y: hidden; @media screen and (min-width: 1280px) { - height: 500px; - width: 100%; + height: 430px; overflow-x: hidden; overflow-y: auto; &::-webkit-scrollbar { @@ -56,3 +47,14 @@ export const WrapTable = styled.div` } } `; + +export const WrapperBlock = styled.div` + width: 704px; + margin-top: 20px; + @media screen and (min-width: 1280px) { + width: 100%; + padding-left: 49px; + padding-right: 16px; + margin-top: 46px; + } +`; diff --git a/src/components/TransactionsList/TransactionDashboard/TransactionsDashboard.jsx b/src/components/TransactionsList/TransactionDashboard/TransactionsDashboard.jsx index c8af63e..c8d02a2 100644 --- a/src/components/TransactionsList/TransactionDashboard/TransactionsDashboard.jsx +++ b/src/components/TransactionsList/TransactionDashboard/TransactionsDashboard.jsx @@ -5,6 +5,7 @@ import { StyledThead, StyledTheadItem, WrapTable, + WrapperBlock, } from './TransactionDashboard.styled'; import { useDispatch, useSelector } from 'react-redux'; import { transactionsData } from 'store/Transactions/selectors'; @@ -20,7 +21,7 @@ const TransactionsDashboard = ({ open, get }) => { }, [dispatch]); return ( - + @@ -34,22 +35,26 @@ const TransactionsDashboard = ({ open, get }) => { - - {transactions.length !== 0 - ? sortedTransactions(transactions).map(transaction => { - return ( - - ); - }) - : null} - - + + + + {transactions.length !== 0 + ? sortedTransactions(transactions).map(transaction => { + return ( + + ); + }) + : null} + + + + ); }; diff --git a/src/components/TransactionsList/TransactionMobile/TransactionMobile.jsx b/src/components/TransactionsList/TransactionMobile/TransactionMobile.jsx index 6878edd..60c19da 100644 --- a/src/components/TransactionsList/TransactionMobile/TransactionMobile.jsx +++ b/src/components/TransactionsList/TransactionMobile/TransactionMobile.jsx @@ -49,7 +49,11 @@ const TransactionMobile = ({ open, get }) => { const transType = transaction.type === 'EXPENSE' ? '-' : '+'; return ( - + = 20 ? true : false} + >