-
Notifications
You must be signed in to change notification settings - Fork 30
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
Jingwei/982 onboarding card compoent #1011
Jingwei/982 onboarding card compoent #1011
Conversation
|
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.
I've reviewed your changes @sky1122, and left feedback below.
@@ -38,6 +41,22 @@ export default function UserOnboardingModal({isOpen}) { | |||
<ModalBody> | |||
<Typography type="p"> body</Typography> | |||
{/* Onboarding Card Component */} | |||
{/* passing a prop to decide show checked or unchecked |
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.
Move these comments to the OnboardingCard.js file.
iconImg, | ||
title, | ||
subtitle, | ||
checked, |
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.
rename this prop to "completed", this name follows the user story better, and reflect where necessary.
subtitle, | ||
checked, | ||
}) { | ||
console.log({ iconImg }); |
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.
remove console logs
|
||
|
||
|
||
<CheckedWrapper > |
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.
Is there anyway of removing this "CheckedWrapper"?
- I see you have added a
padding-right: 34px
, you can move this style into "OnboardingCardLayer". - The
align-self: centre
can be moved into the "OnbordingCardLayer" asalign-items: centre
.
display: flex; | ||
justify-content: space-between; | ||
radius: 10px; | ||
width: 686px; |
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.
set width to 100%, should be responsive.
height: auto; | ||
position: relative; | ||
border-radius: 10px; | ||
border: 1px solid #000000; |
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.
border is not needed.
export const OnboardingCardLayer = styled.div` | ||
display: flex; | ||
justify-content: space-between; | ||
radius: 10px; |
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.
you have radius & border-radius used here, should it not be radius?
console.log({ title }); | ||
console.log({ checked }); | ||
return ( | ||
<OnboardingCardLayer checked = {checked}> |
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.
"OnboardingCardContainer" Would be a better name/description.
<OnboardingCardLayer checked = {checked}> | ||
{/* <img src={iconImg} alt="icon" /> */} | ||
<PicWrapper> | ||
<TextWrapper> |
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.
This "TextWrapper" is not needed here. You can add your paddings to the "PicWrapper" styled component. You can also utilise:
- gap: 10px; gap: 10px 20px; /* row-gap column gap */ row-gap: 10px; column-gap: 20px;
css properties for flex boxes.
) | ||
|
||
export const IconImg = ({iconImg}) => { | ||
console.log("style"); |
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.
remove console.logs
I make these changes, however, because the tag in the library cannot change the color, and after the typography component get this works. The color will be able to change. |
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.
Hey Jingwei there is a merge conflict in apps\user-profile\src\components\modules\UserOnboardingModal\UserOnboardingModal.js I think that once it is solved this branch is good to go
I resolve this conflict, please take a look when you are free. |
…aunchers/dev-launchers-platform into Jingwei/982-OnboardingCardCompoent
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.
Just two changes i need you to make. I've approved the PR, once you pushed the changes, you can then merge yourself 👍🏾
@@ -18,7 +18,8 @@ export default function UserProfilePage() { | |||
* More conditions will be applied when modal should be opened in the future. | |||
*/ | |||
const openUserOnboardingModal = () => { | |||
return !(userData && userData.username) | |||
return true; |
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.
revert your changes here. Do not push me.js
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.
So just uncomment return !(userData...)
, and delete the return true
import React from 'react' | ||
import { Typography } from '@devlaunchers/components/components/atoms' | ||
import { OnboardingCardContainer, PicWrapper, TextWrapper, CheckedWrapper, CheckedSVG, IconImg } from './StyledOnboardingCard' | ||
export default function OnboardingCard({ |
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.
changes:
1. create OnboardingCard file in website/src/modules
2. create index.js
3. create OnboardingCard.js
4. StyledOnboardingCard.js
Issue:
1. import { Typography } from '@devlaunchers/components/components/atoms' seems I didn't use It correctly, so the font is not working.
How to use the component:
the demo of how to use this component is in user-profile/src/UserOnboardingModal/UserOnboardingModal.js