Last active
October 13, 2022 07:20
-
-
Save luismartinezs/ecee1f95bfc8fa88a4c7c8618c981654 to your computer and use it in GitHub Desktop.
FormattedMessage #react-intl
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<FormattedMessage | |
id="foo" | |
defaultMessage="To buy a shoe, <a>visit our website</a> and <cta>buy a shoe</cta>" | |
values={{ | |
a: chunks => ( | |
<a | |
class="external_link" | |
target="_blank" | |
href="https://www.example.com/shoe" | |
> | |
{chunks} | |
</a> | |
), | |
cta: chunks => <strong class="important">{chunks}</strong>, | |
}} | |
> | |
{chunks => <h2>{chunks}</h2>} | |
</FormattedMessage> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment