-
Notifications
You must be signed in to change notification settings - Fork 180
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
feat(app): create multiSlideout and plug into ChooseRobotSlideout #14649
Conversation
const Children = ( | ||
<React.Fragment> | ||
<StyledText | ||
fontWeight={TYPOGRAPHY.fontWeightSemiBold} | ||
fontSize={TYPOGRAPHY.fontSizeP} | ||
> | ||
{firstPage ? 'first page body' : 'second page body'} | ||
</StyledText> | ||
|
||
<PrimaryBtn | ||
marginTop="28rem" | ||
onClick={togglePage} | ||
backgroundColor={COLORS.blue50} | ||
textTransform={TYPOGRAPHY.textTransformNone} | ||
> | ||
<StyledText | ||
fontWeight={TYPOGRAPHY.fontWeightRegular} | ||
fontSize={TYPOGRAPHY.fontSizeP} | ||
> | ||
{firstPage ? 'Go to Second Page' : 'Go to First Page'} | ||
</StyledText> | ||
</PrimaryBtn> | ||
</React.Fragment> | ||
) | ||
|
||
return ( | ||
<MultiSlideout | ||
{...args} | ||
children={Children} | ||
currentStep={firstPage ? 1 : 2} | ||
/> | ||
) | ||
} |
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.
From the error message, we will need to change something like below.
tested the following code and it worked the same as you wrote on Storybook.
const Children = ( | |
<React.Fragment> | |
<StyledText | |
fontWeight={TYPOGRAPHY.fontWeightSemiBold} | |
fontSize={TYPOGRAPHY.fontSizeP} | |
> | |
{firstPage ? 'first page body' : 'second page body'} | |
</StyledText> | |
<PrimaryBtn | |
marginTop="28rem" | |
onClick={togglePage} | |
backgroundColor={COLORS.blue50} | |
textTransform={TYPOGRAPHY.textTransformNone} | |
> | |
<StyledText | |
fontWeight={TYPOGRAPHY.fontWeightRegular} | |
fontSize={TYPOGRAPHY.fontSizeP} | |
> | |
{firstPage ? 'Go to Second Page' : 'Go to First Page'} | |
</StyledText> | |
</PrimaryBtn> | |
</React.Fragment> | |
) | |
return ( | |
<MultiSlideout | |
{...args} | |
children={Children} | |
currentStep={firstPage ? 1 : 2} | |
/> | |
) | |
} | |
return ( | |
<MultiSlideout {...args} currentStep={firstPage ? 1 : 2}> | |
<StyledText as="p"> | |
{firstPage ? 'first page body' : 'second page body'} | |
</StyledText> | |
<PrimaryBtn | |
marginTop="28rem" | |
onClick={togglePage} | |
backgroundColor={COLORS.blue50} | |
textTransform={TYPOGRAPHY.textTransformNone} | |
> | |
<StyledText as="p"> | |
{firstPage ? 'Go to Second Page' : 'Go to First Page'} | |
</StyledText> | |
</PrimaryBtn> | |
</MultiSlideout> | |
) |
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.
oh ya i fixed this in my last commit, thank you!!
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.
LGTM!
thank you for adding a storybook!
closes https://opentrons.atlassian.net/browse/AUTH-97
Overview
This created the
MultiSlideout
component and then plugs it into theChooseRobotSlideout
Test Plan
in the app, turn on the RTP ff, click to start protocol setup. the
choose robot slideout
should have 2 steps. the first step should be completed and the 2nd step should have atodo
. The buttons should match designsChangelog
MultiSlideout
and modifySlideout
to accommodate multi stepsChooseRobotSlideout
andChooseRobotToRunProtocolSlideout
Review requests
see test plan
Risk assessment
low