-
Notifications
You must be signed in to change notification settings - Fork 25
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
Applies to section #159
Applies to section #159
Conversation
Hello and thank you for your contribution! Before we can merge your pull request, we ask that you create a changeset to describe your changes. This will help us manage versions and release notes. You can create a changeset by running |
b624e0b
to
de532d9
Compare
|
||
return ( | ||
<Page> | ||
<AppliesTo |
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 think we could wrap this in a Card
so that it stands out a bit more in the stories :)
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 a small nit for the story to be wrapped in a card, but LGTM otherwise! 🙏
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.
nit comments
lgtm!
}, [productSelector, collectionSelector, eligibility]); | ||
return ( | ||
<> | ||
{productSelector || collectionSelector ? ( |
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 rendering condition is duplicated in the ValueCard component. Probably better if the parent component takes care of the rendering responsibility.
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.
Reluctant to remove this because the component could be rendered on its own, without the value card. So I wonder if it's better to leave that logic in both places?
@@ -225,6 +239,16 @@ export function ValueCard({ | |||
} | |||
/> | |||
)} | |||
{eligibility && | |||
selectedItems && | |||
(productSelector || collectionSelector) ? ( |
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.
See my comment in the AppliesTo component.
nit: extract it into a variable for readability
94ef7d6
to
9d39bdd
Compare
It looks like CurrencyField or Date selectors aren't wrapped in cards, for consistency would it be ok if we left the AppliesTo section outside of a card? (Since it would be meant to be used inside another card, in most cases inside the ValueCard?) |
if that's the pattern we are maintaining currently, sure! |
What problem is this PR solving?
Resolves: #137
Reviewers’ hat-rack 🎩
yarn storybook
Before you deploy