From 4a5252fd50cefa3eddbf5fe84804f9f20eca48b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vi=CC=81ctor=20Falco=CC=81n?= Date: Thu, 25 Jun 2026 09:07:51 +0200 Subject: [PATCH] fix(transactions): make AI consent banner responsive on mobile Restyle the banner row (stacked layout on small screens, secondary button) and let its DataTable topRow cell wrap text instead of inheriting the data cell's whitespace-nowrap, so the max-width constraint applies and the table no longer overflows horizontally on mobile. --- resources/js/components/ui/data-table.tsx | 5 ++- resources/js/pages/transactions/index.tsx | 39 ++++++++++++----------- 2 files changed, 25 insertions(+), 19 deletions(-) diff --git a/resources/js/components/ui/data-table.tsx b/resources/js/components/ui/data-table.tsx index 26bd2c44..e84a4bcd 100644 --- a/resources/js/components/ui/data-table.tsx +++ b/resources/js/components/ui/data-table.tsx @@ -126,7 +126,10 @@ export function DataTable({ {topRow && ( - + {topRow} diff --git a/resources/js/pages/transactions/index.tsx b/resources/js/pages/transactions/index.tsx index 999f42d4..db87b103 100644 --- a/resources/js/pages/transactions/index.tsx +++ b/resources/js/pages/transactions/index.tsx @@ -13,7 +13,7 @@ import { import { VirtualItem, Virtualizer } from '@tanstack/react-virtual'; import axios from 'axios'; import { format, getYear, parseISO } from 'date-fns'; -import { SparklesIcon } from 'lucide-react'; +import { ChevronRight } from 'lucide-react'; import { createElement, useCallback, @@ -1277,29 +1277,32 @@ export default function Transactions({ )} topRow={ showAiConsentBanner ? ( -
-
- -
-
-

- {__( - 'Let AI categorize your transactions', - )} -

-

- {__( - 'Give your consent and our AI will suggest categories for your transactions automatically.', - )} -

+
+
+
+ +
+
+

+ {__( + 'Let AI categorize your transactions', + )} +

+

+ {__( + 'Give your consent and our AI will suggest categories for your transactions automatically.', + )} +

+
) : null