Skip to content

Commit

Permalink
chore(MobileDialogPrimitive): migrate stories from CSF2 to CSF3
Browse files Browse the repository at this point in the history
  • Loading branch information
domihustinova committed Sep 24, 2024
1 parent b18ce03 commit e3a5201
Showing 1 changed file with 29 additions and 35 deletions.
Original file line number Diff line number Diff line change
@@ -1,49 +1,43 @@
import * as React from "react";
import { action } from "@storybook/addon-actions";
import type { Meta, StoryObj } from "@storybook/react";

import Button from "../../Button";

import TooltipPrimitive from ".";

export default {
const meta: Meta<typeof TooltipPrimitive> = {
title: "MobileDialogPrimitive",
};

export const Playground = ({
content,
dataTest,
tabIndex,
enabled,
stopPropagation,
removeUnderlinedText,
labelClose,
}) => {
return (
<TooltipPrimitive
content={content}
dataTest={dataTest}
tabIndex={tabIndex}
labelClose={labelClose}
enabled={enabled}
stopPropagation={stopPropagation}
removeUnderlinedText={removeUnderlinedText}
>
<Button>Open Mobile Dialog</Button>
</TooltipPrimitive>
);
};
component: TooltipPrimitive,

Playground.story = {
parameters: {
info: "You can try all possible configurations of this component. However, check Orbit.Kiwi for more detailed design guidelines.",
controls: {
exclude: ["onShow"],
},
},

args: {
labelClose: "Close",
enabled: true,
onShow: action("onShow"),
renderInPortal: true,
tabIndex: 0,
content: "Write your text here.",
stopPropagation: true,
removeUnderlinedText: false,
block: false,
lockScrolling: false,
},
};

Playground.args = {
content: "Write your text here.",
dataTest: "test",
tabIndex: 0,
enabled: true,
stopPropagation: true,
removeUnderlinedText: false,
labelClose: "Close",
export default meta;
type Story = StoryObj<typeof TooltipPrimitive>;

export const Playground: Story = {
render: args => (
<TooltipPrimitive {...args}>
<Button>Open Mobile Dialog</Button>
</TooltipPrimitive>
),
};

0 comments on commit e3a5201

Please sign in to comment.