Skip to content
Snippets Groups Projects
Unverified Commit 7d1f309f authored by Kyle Doherty's avatar Kyle Doherty Committed by GitHub
Browse files

Add entity menu example to storybook (#28614)


* Add entity menu example to storybook

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

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

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

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

---------

Co-authored-by: default avatarRyan Laurie <30528226+iethree@users.noreply.github.com>
parent 125bb42e
No related branches found
No related tags found
No related merge requests found
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>,
};
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment