2022-02-28 21:25:06 +00:00
|
|
|
import React from "react";
|
2025-01-20 16:17:33 +00:00
|
|
|
import { Meta, StoryObj } from "@storybook/react";
|
2022-02-28 21:25:06 +00:00
|
|
|
|
|
|
|
|
import TooltipWrapper from ".";
|
|
|
|
|
|
|
|
|
|
import "../../index.scss";
|
|
|
|
|
|
2025-01-20 16:17:33 +00:00
|
|
|
const meta: Meta<typeof TooltipWrapper> = {
|
2022-02-28 21:25:06 +00:00
|
|
|
component: TooltipWrapper,
|
2023-05-09 15:53:43 +00:00
|
|
|
title: "Components/TooltipWrapper",
|
2022-02-28 21:25:06 +00:00
|
|
|
argTypes: {
|
|
|
|
|
position: {
|
2023-11-07 21:15:49 +00:00
|
|
|
options: [
|
|
|
|
|
"top",
|
|
|
|
|
"top-start",
|
|
|
|
|
"top-end",
|
|
|
|
|
"right",
|
|
|
|
|
"right-start",
|
|
|
|
|
"right-end",
|
|
|
|
|
"bottom",
|
|
|
|
|
"bottom-start",
|
|
|
|
|
"bottom-end",
|
|
|
|
|
"left",
|
|
|
|
|
"left-start",
|
|
|
|
|
"left-end",
|
|
|
|
|
],
|
2022-02-28 21:25:06 +00:00
|
|
|
control: "radio",
|
|
|
|
|
},
|
|
|
|
|
},
|
2025-01-20 16:17:33 +00:00
|
|
|
};
|
2022-02-28 21:25:06 +00:00
|
|
|
|
2025-01-20 16:17:33 +00:00
|
|
|
export default meta;
|
2022-02-28 21:25:06 +00:00
|
|
|
|
2025-01-20 16:17:33 +00:00
|
|
|
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>
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
};
|