CSS Modules Migration for ButtonLink Component#242
Conversation
✅ Deploy Preview for webdevpathstage ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
@Satoshi-Sh could you please pull the latest main and push to your branch? |
3a3d01f to
a6a485e
Compare
6b1b3ac to
43e974e
Compare
cherylli
left a comment
There was a problem hiding this comment.
Buttons are not working now, there are a few things need to be done to fix it.
- customClassName is always undefined because it was not passed into it (from TwoColumn)
<ButtonLink
link={link}
$colorScheme={$btnColorScheme}
openNewTab={openNewTab}
>
{linkText}
</ButtonLink>We need to remove $colorScheme and change it to customClassName
(although I think "customButtonClass" or something like that is more descriptive as it's only used for the buttons)
- inverted-grey is now invertedGrey, although maybe we should rename it back to
inverted-greywhich is more common css naming
$btnColorScheme='inverted-grey' needs to be changed to customBtnClass='invertedGrey' for it to work (but consider changing it back to inverted-grey as mentioned above. In this case, you would only need to change the CSS name in the scss file)
there are also some inverted-white which need to be changed.
-
this custom class needs to be passed down from
about.js -
check if other pages is using buttonlink
43e974e to
092ffd3
Compare
092ffd3 to
cb905d0
Compare
cherylli
left a comment
There was a problem hiding this comment.
Buttons are working now, thanks!
|
Thanks for reviewing this in detail. @cherylli |
briangesteban
left a comment
There was a problem hiding this comment.
Fix Request
- Need to fix buttons on the Homepage as well. The background color and transition is not working properly.
Improvement Suggestion
const buttonClass = customBtnClass
? `${styles.buttonLink} ${styles[customBtnClass]}`
: styles.buttonLink;
This code snippet above seems to be re-usable, and might be use in the SubmitButton component. We could create a helper function under utils for this, something like getButtonStyle or something similar.
|
Thanks for the review, @briangesteban .
I keep this for now as submission button doesn't have the effect. |
There was a problem hiding this comment.
Looks good to me now. Everything's working back smoothly. Thanks @Satoshi-Sh !
oluwatobiss
left a comment
There was a problem hiding this comment.
ButtonLinks all looks good. Thanks @Satoshi-Sh!
This PR depends on #239
Have you updated the CHANGELOG.md file? If not, please do it.
Yes
What is this change?
CSS Modules Migration for ButtonLink Component
If necessary, please describe how to test the new feature or fix.
You could check the styling behavior of Contact Us button on
/aboutpage.When should this be merged?
After review and once PR #239 is merged.