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(text): allow to pass intl message instead of children #651

Merged
merged 1 commit into from
Apr 5, 2019

Conversation

emmenko
Copy link
Member

@emmenko emmenko commented Apr 5, 2019

Fixes #637

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.

💯

title: nonEmptyString,
truncate: PropTypes.bool,
intlMessage: intlMessageShape,
Copy link
Contributor

Choose a reason for hiding this comment

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

Should this be flipped to the case below. Given there are no children then this?

Copy link
Member Author

Choose a reason for hiding this comment

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

Ah thanks, good catch!

@emmenko emmenko force-pushed the nm-text-intl-message branch from 4b50b10 to 656a49a Compare April 5, 2019 13:54
@montezume
Copy link
Contributor

Can you add the new VRT's at the end to make reviewing easier 🙏

@emmenko emmenko force-pushed the nm-text-intl-message branch from 656a49a to bc69eda Compare April 5, 2019 14:00
@emmenko
Copy link
Member Author

emmenko commented Apr 5, 2019

@montezume do you want to review/approve the VRT?

@montezume
Copy link
Contributor

@emmenko 👍 done

title: nonEmptyString,
truncate: PropTypes.bool,
intlMessage: requiredIf(intlMessageShape, props => !props.children),
children: requiredIf(PropTypes.node, props => !props.intlMessage),
Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks!

@emmenko emmenko merged commit 5e108e5 into master Apr 5, 2019
@emmenko emmenko deleted the nm-text-intl-message branch April 5, 2019 19:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants