-
Notifications
You must be signed in to change notification settings - Fork 152
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(MobileDialogPrimitive): migrate stories from CSF2 to CSF3
- Loading branch information
1 parent
b18ce03
commit e3a5201
Showing
1 changed file
with
29 additions
and
35 deletions.
There are no files selected for viewing
64 changes: 29 additions & 35 deletions
64
...s/orbit-components/src/primitives/MobileDialogPrimitive/MobileDialogPrimitive.stories.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> | ||
), | ||
}; |