Skip to content

Commit 57a57b4

Browse files
committed
InfoBox storybook file
1 parent aa787c2 commit 57a57b4

File tree

2 files changed

+122
-0
lines changed

2 files changed

+122
-0
lines changed
Lines changed: 118 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,118 @@
1+
import {
2+
BeakerIcon,
3+
BellAlertIcon,
4+
BookOpenIcon,
5+
ClockIcon,
6+
InformationCircleIcon,
7+
PlusIcon,
8+
RocketLaunchIcon,
9+
ServerStackIcon,
10+
Squares2X2Icon,
11+
} from "@heroicons/react/20/solid";
12+
import { InfoPanel } from "~/components/primitives/InfoPanel";
13+
import { TaskIcon } from "~/assets/icons/TaskIcon";
14+
15+
export default function Story() {
16+
return (
17+
<div className="flex h-full flex-col gap-12 p-12">
18+
<div className="grid grid-cols-2 gap-8">
19+
{/* Basic Info Panel */}
20+
<InfoPanel
21+
title="Basic Info Panel"
22+
icon={InformationCircleIcon}
23+
iconClassName="text-blue-500"
24+
>
25+
This is a basic info panel with title and default variant
26+
</InfoPanel>
27+
28+
{/* Info Panel with Button */}
29+
<InfoPanel
30+
title="Info with Button"
31+
icon={InformationCircleIcon}
32+
iconClassName="text-blue-500"
33+
to="#"
34+
buttonLabel="Learn More"
35+
>
36+
This panel includes a button in the top-right corner
37+
</InfoPanel>
38+
39+
{/* Upgrade Variant with Button */}
40+
<InfoPanel
41+
title="Upgrade Panel"
42+
icon={BellAlertIcon}
43+
iconClassName="text-red-500"
44+
variant="upgrade"
45+
to="#"
46+
buttonLabel="Upgrade Now"
47+
>
48+
This panel uses the upgrade variant with a call-to-action button
49+
</InfoPanel>
50+
51+
{/* Minimal Variant */}
52+
<InfoPanel icon={ClockIcon} iconClassName="text-sun-500" variant="minimal">
53+
A minimal variant without a title
54+
</InfoPanel>
55+
56+
{/* Task Panel with Action */}
57+
<InfoPanel
58+
title="Task Status"
59+
icon={TaskIcon}
60+
iconClassName="text-blue-500"
61+
to="#"
62+
buttonLabel="View Tasks"
63+
>
64+
A panel showing task information with a view action
65+
</InfoPanel>
66+
67+
{/* Getting Started Panel */}
68+
<InfoPanel
69+
title="Getting Started"
70+
icon={RocketLaunchIcon}
71+
iconClassName="text-purple-500"
72+
to="#"
73+
buttonLabel="Start Tutorial"
74+
>
75+
Begin your journey with our quick start guide
76+
</InfoPanel>
77+
78+
{/* Deployment Panel with Button */}
79+
<InfoPanel
80+
title="Deployment Status"
81+
icon={ServerStackIcon}
82+
iconClassName="text-indigo-500"
83+
to="#"
84+
buttonLabel="Deploy Now"
85+
>
86+
Ready to deploy your changes to production
87+
</InfoPanel>
88+
89+
{/* Create New Panel */}
90+
<InfoPanel
91+
title="Create New"
92+
icon={PlusIcon}
93+
iconClassName="text-green-500"
94+
to="#"
95+
buttonLabel="New Project"
96+
>
97+
Start a new project with our guided setup
98+
</InfoPanel>
99+
100+
{/* Batches Panel */}
101+
<InfoPanel title="Batch Operations" icon={Squares2X2Icon} iconClassName="text-purple-500">
102+
Information about batch processing
103+
</InfoPanel>
104+
105+
{/* Documentation Panel with Link */}
106+
<InfoPanel
107+
title="Documentation"
108+
icon={BookOpenIcon}
109+
iconClassName="text-green-500"
110+
to="#"
111+
buttonLabel="View Docs"
112+
>
113+
Access our comprehensive documentation
114+
</InfoPanel>
115+
</div>
116+
</div>
117+
);
118+
}

apps/webapp/app/routes/storybook/route.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,10 @@ const stories: Story[] = [
5252
name: "Free plan usage",
5353
slug: "free-plan-usage",
5454
},
55+
{
56+
name: "Info panel",
57+
slug: "info-panel",
58+
},
5559
{
5660
name: "Inline code",
5761
slug: "inline-code",

0 commit comments

Comments
 (0)