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

feat(messages): to add intlMessage prop to error and warning message components #1261

Merged
merged 3 commits into from
Feb 11, 2020

Conversation

YahiaElTai
Copy link
Contributor

Summary

Adding intlMessage prop to ErrorMessage and WarningMessage components similair to Text component

Description

current usage of ErrorMessage or WarningMessage:

    <ErrorMessage>
       <FormattedMessage {...validationMessages.required} />
    </ErrorMessage>

adding intlMessage prop will help reduce code and nesting of components inside one another.

desired usage of ErrorMessage or WarningMessage:

    <ErrorMessage intlMessage={validationMessages.required} />

This feature implemetation doesn't change the API of the components.

@YahiaElTai YahiaElTai added the 🙏 Status: Dev Review Waiting for technical reviews label Feb 11, 2020
@YahiaElTai YahiaElTai self-assigned this Feb 11, 2020
@vercel
Copy link

vercel bot commented Feb 11, 2020

This pull request is being automatically deployed with ZEIT Now (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://zeit.co/commercetools/ui-kit/27xe6wixl
✅ Preview: https://ui-kit-git-yt-error-warning-messages.commercetools.now.sh

Copy link
Contributor

@tdeekens tdeekens left a comment

Choose a reason for hiding this comment

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

Nice. Not sure if @jonnybel wants a percy snapshot. I guess it doesn't provide miuch benefit.

Copy link
Contributor

@jonnybel jonnybel left a comment

Choose a reason for hiding this comment

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

Great!

Just added 2 smol corrections to the Readme 😁

@jonnybel jonnybel merged commit a3d4d1f into master Feb 11, 2020
@jonnybel jonnybel deleted the yt-error-warning-messages branch February 11, 2020 16:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🙏 Status: Dev Review Waiting for technical reviews
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants