Skip to content

Commit

Permalink
feat: hovercard component (#88)
Browse files Browse the repository at this point in the history
  • Loading branch information
Cahllagerfeld authored Jul 3, 2024
1 parent 38f1350 commit ec02574
Show file tree
Hide file tree
Showing 7 changed files with 271 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/tame-lemons-relax.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@zenml-io/react-component-library": minor
---

add hover card component
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@
"@radix-ui/react-collapsible": "^1.0.3",
"@radix-ui/react-dialog": "^1.0.5",
"@radix-ui/react-dropdown-menu": "^2.0.6",
"@radix-ui/react-hover-card": "^1.1.1",
"@radix-ui/react-progress": "^1.0.3",
"@radix-ui/react-scroll-area": "^1.1.0",
"@radix-ui/react-select": "^2.0.0",
Expand Down
204 changes: 204 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

31 changes: 31 additions & 0 deletions src/components/HoverCard/HoverCard.stories.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
import { Meta } from "@storybook/react";
import React from "react";
import { HoverCard, HoverCardContent, HoverCardTrigger } from ".";
import { StoryObj } from "@storybook/react";

const meta = {
title: "Elements/HoverCard",
component: HoverCard,
argTypes: {},
parameters: {
layout: "centered"
},

tags: ["autodocs"]
} satisfies Meta<typeof HoverCard>;

export default meta;

type Story = StoryObj<typeof meta>;

export const DefaultVariant: Story = {
name: "Default",
render: () => (
<HoverCard>
<HoverCardTrigger className="border border-theme-border-moderate px-3 py-2 bg-theme-surface-primary rounded-md">
Hover
</HoverCardTrigger>
<HoverCardContent>This is a hover card</HoverCardContent>
</HoverCard>
)
};
Loading

0 comments on commit ec02574

Please sign in to comment.