diff --git a/front/src/features/app/App.css b/front/src/features/app/App.css index 7ce552c9..5b32ce7f 100644 --- a/front/src/features/app/App.css +++ b/front/src/features/app/App.css @@ -11,24 +11,54 @@ gap: 16px; padding: 24px; - & > *:nth-child(odd) { - justify-self: end; - } - - & > *:nth-child(even) { - justify-self: start; - } - @media (max-width: 576px) { grid-template: 'outcome' 'income' 'history' 'stats'; + } +} + +.income { + grid-area: income; + justify-self: start; + + max-width: 500px; + + @media (max-width: 768px) { + width: 100%; + } + @media (max-width: 576px) { + justify-self: stretch; + } +} - & > *:nth-child(even), - & > *:nth-child(odd) { - justify-self: stretch; - } +.outcome { + grid-area: outcome; + + justify-self: end; + max-width: 500px; + + @media (max-width: 768px) { + width: 100%; + } + @media (max-width: 576px) { + justify-self: stretch; + } +} + +.history { + grid-area: history; + justify-self: center; + + min-width: 1016px; + + @media (max-width: 1064px) { + min-width: 100%; + } + + @media (max-width: 576px) { + justify-self: stretch; } } diff --git a/front/src/features/app/App.tsx b/front/src/features/app/App.tsx index 89fca411..16bbd4b9 100644 --- a/front/src/features/app/App.tsx +++ b/front/src/features/app/App.tsx @@ -7,10 +7,10 @@ import { Stats } from './features/stats' export const App = () => ( <>
- - + + +
- ) diff --git a/front/src/features/app/features/create/SimpleForm.css b/front/src/features/app/features/create/SimpleForm.css index a5215b84..00a9562f 100644 --- a/front/src/features/app/features/create/SimpleForm.css +++ b/front/src/features/app/features/create/SimpleForm.css @@ -1,11 +1,3 @@ -.container { - max-width: 500px; - - @media (max-width: 768px) { - width: 100%; - } -} - .form { display: grid; diff --git a/front/src/features/app/features/create/create-income/CreateIncome.tsx b/front/src/features/app/features/create/create-income/CreateIncome.tsx index 60c9eb0e..0d99d14d 100644 --- a/front/src/features/app/features/create/create-income/CreateIncome.tsx +++ b/front/src/features/app/features/create/create-income/CreateIncome.tsx @@ -17,7 +17,11 @@ import { IncomeModel } from '@shared/models/money/IncomeModel' import * as styles from '../SimpleForm.css' -export const CreateIncome = () => { +interface Props { + className?: string +} + +export const CreateIncome = ({ className }: Props) => { const create = useCreateIncome() const fieldsToIncomeModel = useCallback( @@ -43,7 +47,7 @@ export const CreateIncome = () => { {({ handleSubmit, form: { initialize }, values, initialValues }) => (
handleSubmit(e)!.then(() => initialize(initialValues))} - className={styles.container} + className={className} >