From 54f8a614837143942b44432e5c37ddb230649cbc Mon Sep 17 00:00:00 2001 From: ekzyis Date: Sat, 7 Sep 2024 17:01:00 +0200 Subject: [PATCH] Random CSS fixes (#1370) * Fix missing margin-left for invoice status in /satistics * Fix margin-bottom not applied in invoice info * Only apply margin-left if there is something left --- components/accordian-item.js | 5 +++-- components/invoice.js | 4 +++- pages/satistics/index.js | 10 ++++++---- 3 files changed, 12 insertions(+), 7 deletions(-) diff --git a/components/accordian-item.js b/components/accordian-item.js index 7138f05b..1044d65c 100644 --- a/components/accordian-item.js +++ b/components/accordian-item.js @@ -4,6 +4,7 @@ import { useAccordionButton } from 'react-bootstrap/AccordionButton' import ArrowRight from '@/svgs/arrow-right-s-fill.svg' import ArrowDown from '@/svgs/arrow-down-s-fill.svg' import { useContext, useEffect, useState } from 'react' +import classNames from 'classnames' const KEY_ID = '0' @@ -30,7 +31,7 @@ function ContextAwareToggle ({ children, headerColor = 'var(--theme-grey)', even ) } -export default function AccordianItem ({ header, body, headerColor = 'var(--theme-grey)', show }) { +export default function AccordianItem ({ header, body, className, headerColor = 'var(--theme-grey)', show }) { const [activeKey, setActiveKey] = useState() useEffect(() => { @@ -44,7 +45,7 @@ export default function AccordianItem ({ header, body, headerColor = 'var(--them return (
{header}
- +
{body}
diff --git a/components/invoice.js b/components/invoice.js index a0438450..474fd7c0 100644 --- a/components/invoice.js +++ b/components/invoice.js @@ -109,7 +109,8 @@ export default function Invoice ({ id, query = INVOICE, modal, onPayment, onCanc
} + body={} + className='mb-3' />
} {comment && @@ -117,6 +118,7 @@ export default function Invoice ({ id, query = INVOICE, modal, onPayment, onCanc {comment}} + className='mb-3' /> } diff --git a/pages/satistics/index.js b/pages/satistics/index.js index 13193c3f..67a0b048 100644 --- a/pages/satistics/index.js +++ b/pages/satistics/index.js @@ -18,6 +18,7 @@ import PageLoading from '@/components/page-loading' import PayerData from '@/components/payer-data' import { Badge } from 'react-bootstrap' import navStyles from '../settings/settings.module.css' +import classNames from 'classnames' export const getServerSideProps = getGetServerSideProps({ query: WALLET_HISTORY, authRequired: true }) @@ -36,7 +37,7 @@ function satusClass (status) { } } -function Satus ({ status }) { +function Satus ({ status, className }) { if (!status) { return null } @@ -85,8 +86,8 @@ function Satus ({ status }) { } return ( - - {desc} + + {desc} ) } @@ -141,7 +142,8 @@ function Detail ({ fact }) { (fact.description && {fact.description})} {fact.invoiceComment && sender says: {fact.invoiceComment}} - {fact.autoWithdraw && {fact.type === 'p2p' ? 'p2p' : 'autowithdraw'}} + + {fact.autoWithdraw && {fact.type === 'p2p' ? 'p2p' : 'autowithdraw'}} )