Skip to content
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

Merged
merged 3 commits into from
May 29, 2024
Merged

docs: migrate stories tsx #2152

merged 3 commits into from
May 29, 2024

Conversation

talkor
Copy link
Member

@talkor talkor commented May 29, 2024

@talkor talkor requested a review from a team as a code owner May 29, 2024 14:54
@@ -32,7 +36,7 @@ export const Overview = {
name: "Overview",

args: {
items: [
children: [
Copy link
Member Author

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
Copy link
Member Author

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
Copy link
Member Author

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

Comment on lines +65 to +73
interface ModalHeaderWithOnlyTitle extends BaseModalHeaderProps {
title: ElementContent;
children?: never;
}

interface ModalHeaderWithOnlyChildren extends BaseModalHeaderProps {
title?: never;
children: ElementContent;
}
Copy link
Member Author

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) => {
Copy link
Member Author

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
Copy link
Member Author

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}
Copy link
Member Author

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}>
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

isDismissHidden is deprecated

@talkor talkor merged commit af38325 into master May 29, 2024
10 checks passed
@talkor talkor deleted the docs/migrate-stories-tsx branch May 29, 2024 15:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants