From 7d1f309f9c42231feb7a252e96aa07076b2a0587 Mon Sep 17 00:00:00 2001
From: Kyle Doherty <5248953+kdoh@users.noreply.github.com>
Date: Tue, 28 Mar 2023 12:55:35 -0400
Subject: [PATCH] Add entity menu example to storybook (#28614)

* Add entity menu example to storybook

* Update frontend/src/metabase/components/EntityMenu.stories.tsx

Co-authored-by: Ryan Laurie <30528226+iethree@users.noreply.github.com>

* Update frontend/src/metabase/components/EntityMenu.stories.tsx

Co-authored-by: Ryan Laurie <30528226+iethree@users.noreply.github.com>

---------

Co-authored-by: Ryan Laurie <30528226+iethree@users.noreply.github.com>
---
 .../components/EntityMenu.stories.tsx         | 37 +++++++++++++++++++
 1 file changed, 37 insertions(+)
 create mode 100644 frontend/src/metabase/components/EntityMenu.stories.tsx

diff --git a/frontend/src/metabase/components/EntityMenu.stories.tsx b/frontend/src/metabase/components/EntityMenu.stories.tsx
new file mode 100644
index 00000000000..6ac25efaea7
--- /dev/null
+++ b/frontend/src/metabase/components/EntityMenu.stories.tsx
@@ -0,0 +1,37 @@
+import React from "react";
+import type { ComponentStory } from "@storybook/react";
+import EntityMenu from "./EntityMenu";
+
+export default {
+  title: "Components/Entity Menu",
+  component: EntityMenu,
+};
+
+const Template: ComponentStory<typeof EntityMenu> = args => {
+  return <EntityMenu {...args} />;
+};
+
+const items = [
+  {
+    icon: "link",
+    title: "Option 1 - External link",
+    link: "https://google.com",
+    externalLink: true,
+  },
+  {
+    icon: "link",
+    title: "Option 2 - Relative link",
+    link: "/",
+  },
+  {
+    icon: "bolt",
+    title: "Option 3 - Action",
+    action: () => alert("Yo"),
+  },
+];
+
+export const Default = Template.bind({});
+Default.args = {
+  items,
+  trigger: <span>Click Me</span>,
+};
-- 
GitLab