-
Notifications
You must be signed in to change notification settings - Fork 323
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
docs: migrate stories tsx #2152
Conversation
@@ -32,7 +36,7 @@ export const Overview = { | |||
name: "Overview", | |||
|
|||
args: { | |||
items: [ | |||
children: [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using a different control is misleading... Should have been children
<StoryDescription | ||
description="Regular" | ||
vertical | ||
// @ts-ignore |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will resolve it later in storybook-blocks, the components are not typed so it's quite a mess now
<Button kind={Button.kinds.SECONDARY} onClick={() => setIsOpen(false)}> | ||
<Button | ||
kind={Button.kinds.SECONDARY} | ||
// @ts-ignore |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Something is wrong with the useSwitch hook, it's also not typed so it's a bit tricky now
interface ModalHeaderWithOnlyTitle extends BaseModalHeaderProps { | ||
title: ElementContent; | ||
children?: never; | ||
} | ||
|
||
interface ModalHeaderWithOnlyChildren extends BaseModalHeaderProps { | ||
title?: never; | ||
children: ElementContent; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For some reason the title
prop was mandatory even when children
were provided, it came up in the story so I changed it. Now either of them is mandatory
@@ -16,7 +16,7 @@ export const useHelperOpenModalButton = ({ | |||
openModalButtonRef, | |||
color = undefined, | |||
testId = undefined | |||
}) => { | |||
}: any) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some props are not provided by the component, will investigate later
size={Slider.sizes.SMALL} | ||
/> | ||
<Slider | ||
// @ts-ignore |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Something here is wrong with the icon type, will investigate later
@@ -157,9 +157,9 @@ export const StepsInsideATipseen = { | |||
<Tipseen | |||
position={Tipseen.positions.LEFT} | |||
modifiers={modifiers} | |||
animationType={Tipseen.animationTypes.OPACITY_AND_SLIDE} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should have been here all along
return ( | ||
<Tipseen | ||
// The modifier's purpose is to prevent the tipseen from being displayed when the user scrolls the story upwards / downwards. | ||
// Therefore, there is no need to move this prop in your implementations. | ||
modifiers={modifiers} | ||
position={position} | ||
content={ | ||
<TipseenContent isDismissHidden={isDismissHidden} title={title}> | ||
<TipseenContent hideDismiss={hideDismiss} title={title}> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
isDismissHidden
is deprecated
https://monday.monday.com/boards/3532714909/pulses/6086045892