chore: catch up Storybook preview, coverage, and story hygiene
Stories were throwing without AuthModal/CreateFlow providers, autodocs was a no-op, and several DS/create-flow screens had no stories.
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import React from "react";
|
||||
import Tooltip from "../../app/components/modals/Tooltip";
|
||||
import Button from "../../app/components/buttons/Button";
|
||||
import { TOOLTIP_POSITION_OPTIONS } from "../../lib/propNormalization";
|
||||
|
||||
export default {
|
||||
title: "Components/Modals/Tooltip",
|
||||
@@ -8,7 +9,7 @@ export default {
|
||||
argTypes: {
|
||||
position: {
|
||||
control: { type: "select" },
|
||||
options: ["top", "bottom"],
|
||||
options: [...TOOLTIP_POSITION_OPTIONS],
|
||||
},
|
||||
disabled: {
|
||||
control: { type: "boolean" },
|
||||
@@ -29,37 +30,42 @@ const Template = (args) => (
|
||||
</div>
|
||||
);
|
||||
|
||||
export const Default = Template.bind({});
|
||||
Default.args = {
|
||||
text: "Tooltip text goes here",
|
||||
position: "top",
|
||||
disabled: false,
|
||||
export const Default = {
|
||||
args: {
|
||||
text: "Tooltip text goes here",
|
||||
position: "top",
|
||||
disabled: false,
|
||||
},
|
||||
render: Template,
|
||||
};
|
||||
|
||||
export const Top = Template.bind({});
|
||||
Top.args = {
|
||||
text: "Tooltip positioned at top",
|
||||
position: "top",
|
||||
export const Top = {
|
||||
args: {
|
||||
text: "Tooltip positioned at top",
|
||||
position: "top",
|
||||
},
|
||||
render: Template,
|
||||
};
|
||||
|
||||
export const Bottom = Template.bind({});
|
||||
Bottom.args = {
|
||||
text: "Tooltip positioned at bottom",
|
||||
position: "bottom",
|
||||
export const Bottom = {
|
||||
args: {
|
||||
text: "Tooltip positioned at bottom",
|
||||
position: "bottom",
|
||||
},
|
||||
render: Template,
|
||||
};
|
||||
|
||||
export const Disabled = Template.bind({});
|
||||
Disabled.args = {
|
||||
text: "This tooltip is disabled",
|
||||
disabled: true,
|
||||
export const Disabled = {
|
||||
args: {
|
||||
text: "This tooltip is disabled",
|
||||
disabled: true,
|
||||
},
|
||||
render: Template,
|
||||
};
|
||||
|
||||
export const LongText = Template.bind({});
|
||||
LongText.args = {
|
||||
text: "This is a longer tooltip text that demonstrates how the component handles multiple words and extended content",
|
||||
position: "top",
|
||||
export const LongText = {
|
||||
args: {
|
||||
text: "This is a longer tooltip text that demonstrates how the component handles multiple words and extended content",
|
||||
position: "top",
|
||||
},
|
||||
render: Template,
|
||||
};
|
||||
|
||||
export const WithIcon = () => (
|
||||
<div className="p-16 flex items-center justify-center min-h-[200px]">
|
||||
<Tooltip text="Tooltip with icon button" position="top">
|
||||
|
||||
Reference in New Issue
Block a user