mirror of
https://github.com/fleetdm/fleet
synced 2026-04-21 21:47:20 +00:00
For #25349 This updates storybook and its addons to 8.4.7. This is done to remove the transitive dependency on path-to-regexp, which is no longer used in this version of storybook. This will fix the original vulnerability issue for `path-to-regexp`
48 lines
898 B
TypeScript
48 lines
898 B
TypeScript
import React from "react";
|
|
import { Meta, StoryObj } from "@storybook/react";
|
|
|
|
import TooltipWrapper from ".";
|
|
|
|
import "../../index.scss";
|
|
|
|
const meta: Meta<typeof TooltipWrapper> = {
|
|
component: TooltipWrapper,
|
|
title: "Components/TooltipWrapper",
|
|
argTypes: {
|
|
position: {
|
|
options: [
|
|
"top",
|
|
"top-start",
|
|
"top-end",
|
|
"right",
|
|
"right-start",
|
|
"right-end",
|
|
"bottom",
|
|
"bottom-start",
|
|
"bottom-end",
|
|
"left",
|
|
"left-start",
|
|
"left-end",
|
|
],
|
|
control: "radio",
|
|
},
|
|
},
|
|
};
|
|
|
|
export default meta;
|
|
|
|
type Story = StoryObj<typeof TooltipWrapper>;
|
|
|
|
export const Default: Story = {
|
|
args: {
|
|
tipContent: "This is an example tooltip.",
|
|
children: "Example text",
|
|
},
|
|
decorators: [
|
|
(Story) => (
|
|
<div style={{ margin: "4rem 0" }}>
|
|
<Story />
|
|
</div>
|
|
),
|
|
],
|
|
};
|