import type { Meta, StoryObj } from "@storybook/react" import { HoverCard } from "./HoverCard" /** * Displays additional information when hovering over an element. * * ## Props * - `Root`: Container for the hover card * - `Trigger`: Element that triggers the hover card * - `Content`: Content displayed in the hover card * * ### Content Props * - `size`: "1" | "2" | "3" (default: "2") * - `width`: string (custom width) * - `height`: string (custom height) * - `minWidth`: string (minimum width) * - `maxWidth`: string (maximum width) * - `minHeight`: string (minimum height) * - `maxHeight`: string (maximum height) */ const meta = { title: "base/containment/HoverCard", component: HoverCard.Root, tags: ["autodocs"], parameters: { layout: "centered", }, } satisfies Meta export default meta type Story = StoryObj /** * Basic hover card with simple content. */ export const Default: Story = { render: () => (

Additional Information

This is additional information that appears when you hover over the trigger element.

), } /** * Hover card with different sizes. */ export const Sizes: Story = { render: () => (

Small hover card content

Medium hover card content

Large hover card content

), } /** * Hover card with custom width. */ export const CustomWidth: Story = { render: () => (

Narrow Card

This hover card has a custom narrow width of 200px.

Wide Card

This hover card has a custom wide width of 400px, allowing for more content to be displayed.

), } /** * User profile hover card. */ export const UserProfile: Story = { render: () => (
JD

John Doe

Product Designer

Passionate about creating beautiful and functional user experiences.

), } /** * Product information hover card. */ export const ProductInfo: Story = { render: () => (
📱

iPhone 15 Pro

Latest smartphone model

$999

Storage: 256GB
Color: Titanium
Rating: 4.8/5 ⭐
), } /** * Tooltip-style hover card. */ export const Tooltip: Story = { render: () => (
What is this?

This is a helpful tooltip explanation.

?

Click here for more information.

), } /** * Rich content hover card. */ export const RichContent: Story = { render: () => (

Feature Overview

Discover the powerful features that make our platform stand out from the competition.

⚡ Fast

Lightning quick performance

🔒 Secure

Enterprise-grade security

📱 Responsive

Works on all devices

🎨 Beautiful

Modern design system

), } /** * Multiple hover cards. */ export const MultipleCards: Story = { render: () => (

Settings

Configure your preferences and account settings.

Help Center

Find answers to common questions and get support.

User Profile

View and edit your profile information.

), }