fix: My QR cards stack the QR above its buttons
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EFUzfj5akPxyikzGc2iAHM
This commit is contained in:
1 parent
282d2263f2
commit
2c7729d139
2 files changed
+10
-1
No files matched your search
@@ -34,4 +34,13 @@ describe("My QR codes as cards", () => {
|
||||
expect(badge.closest("[data-slot=card-header]")).toBeTruthy();
|
||||
expect(container.querySelectorAll("[data-slot=card]")).toHaveLength(1);
|
||||
});
|
||||
|
||||
it("stacks the QR above its buttons, so a narrow card never overflows", async () => {
|
||||
mocks.getMyLinks.mockResolvedValue([LINK]);
|
||||
const { container } = render(<MyQrPage />);
|
||||
await screen.findByText("Expo 2026");
|
||||
const item = container.querySelector("[data-slot=card-content] > div")!;
|
||||
expect(item).toHaveClass("sm:flex-col");
|
||||
expect(item).not.toHaveClass("sm:flex-row");
|
||||
});
|
||||
});
|
||||
@@ -47,7 +47,7 @@ export default function MyQrPage() {
|
||||
</CardDescription>
|
||||
</CardHeader>
|
||||
<CardContent>
|
||||
<QrCodeItem eventName={l.eventName} token={l.token} enabled={l.enabled} personal className="border-0 p-0" />
|
||||
<QrCodeItem eventName={l.eventName} token={l.token} enabled={l.enabled} personal className="border-0 p-0 sm:flex-col sm:items-start" />
|
||||
</CardContent>
|
||||
</Card>
|
||||
))}
|
||||
|
||||
Reference in new issue
Block a user