Skip to content

Commit 927b361

Browse files
style(popover): add max-w-4xl, add demo with very long content
1 parent a91a3de commit 927b361

File tree

3 files changed

+61
-2
lines changed

3 files changed

+61
-2
lines changed

lib/interactive/popover/classesPopoverContent.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import { classMerge } from "~ui/utils/classMerge"
22

33
export const classesPopoverContent = [
44
"z-50", // positioning
5+
"max-w-4xl",
56
"px-3 py-3", // spacing
67
"rounded-lg", // border
78
"dark:border", // border

src/demos/interactive/DemoPopover.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import { LongContent } from "@/demos/interactive/LongContent"
12
import { mdiDotsVertical } from "@mdi/js"
23
import { buttonVariant } from "~ui/interactive/button/buttonCva"
34
import { CorvuPopover } from "~ui/interactive/popover/CorvuPopover"
@@ -12,7 +13,7 @@ export function DemoPopover() {
1213
<h1 class="text-3xl font-bold mb-6">Popover Demo</h1>
1314
<div class={classArr(classesGridCols3xl, "gap-4")}>
1415
<BasicPopoverDemo title="Start" class="justify-start items-start" />
15-
<BasicPopoverDemo title="Center" class="justify-center items-center" />
16+
<BasicPopoverDemo title="Long content" class="justify-center items-center" />
1617
<BasicPopoverDemo title="End" class="justify-end items-end" />
1718
<IconPopoverDemo title="Icon" class="justify-center items-center" />
1819
</div>
@@ -29,7 +30,7 @@ function BasicPopoverDemo(p: BasicPopoverDemo) {
2930
<div class={classArr("flex flex-col", p.class)}>
3031
<h2 class="text-2xl font-bold mb-4">{p.title + " Popover"}</h2>
3132
<CorvuPopover icon={mdiDotsVertical} variant={buttonVariant.outline} buttonChildren={"Open"}>
32-
<Content />
33+
<LongContent />
3334
</CorvuPopover>
3435
</div>
3536
)
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
export function LongContent() {
2+
return (
3+
<div class="space-y-6">
4+
<div class="min-h-screen">
5+
<h3 class="text-lg font-semibold mb-3">1. Introduction</h3>
6+
<p class="text-muted-foreground leading-relaxed">
7+
Welcome to our service. By using our platform, you agree to comply with and be bound by the following terms
8+
and conditions. Please read these terms carefully before using our services. If you do not agree to these
9+
terms, you should not use our service.
10+
</p>
11+
<p class="mt-4 text-muted-foreground leading-relaxed">
12+
These terms apply to all users of the service, including without limitation users who are browsers, vendors,
13+
customers, merchants, and/or contributors of content. By accessing or using the service, you acknowledge that
14+
you have read, understood, and agree to be bound by these terms.
15+
</p>
16+
</div>
17+
18+
<div class="min-h-screen">
19+
<h3 class="text-lg font-semibold mb-3">2. User Responsibilities</h3>
20+
<p class="text-muted-foreground leading-relaxed">
21+
As a user of our service, you are responsible for maintaining the confidentiality of your account and
22+
password. You agree to accept responsibility for all activities that occur under your account or password.
23+
</p>
24+
<ul class="mt-4 space-y-2 text-muted-foreground list-disc list-inside">
25+
<li>You must provide accurate and complete information</li>
26+
<li>You must not share your password with anyone</li>
27+
<li>You must notify us of any unauthorized use</li>
28+
<li>You must comply with all applicable laws</li>
29+
<li>You must not interfere with or disrupt the service</li>
30+
</ul>
31+
</div>
32+
33+
<div class="min-h-screen">
34+
<h3 class="text-lg font-semibold mb-3">3. Privacy Policy</h3>
35+
<p class="text-muted-foreground leading-relaxed">
36+
Your privacy is important to us. Our Privacy Policy explains how we collect, use, and protect your information
37+
when you use our service. By using our service, you agree to the collection and use of information in
38+
accordance with this policy.
39+
</p>
40+
<div class="mt-4 space-y-3">
41+
<div class="p-4 bg-gray-50 dark:bg-gray-800 rounded-lg">
42+
<h4 class="font-medium mb-2">Information We Collect</h4>
43+
<p class="text-sm text-muted-foreground">Personal information, usage data, and device information</p>
44+
</div>
45+
<div class="p-4 bg-gray-50 dark:bg-gray-800 rounded-lg">
46+
<h4 class="font-medium mb-2">How We Use Information</h4>
47+
<p class="text-sm text-muted-foreground">To provide, maintain, and improve our services</p>
48+
</div>
49+
<div class="p-4 bg-gray-50 dark:bg-gray-800 rounded-lg">
50+
<h4 class="font-medium mb-2">Data Protection</h4>
51+
<p class="text-sm text-muted-foreground">Industry-standard encryption and security measures</p>
52+
</div>
53+
</div>
54+
</div>
55+
</div>
56+
)
57+
}

0 commit comments

Comments
 (0)