Skip to content

Commit

Permalink
Merge pull request #10 from ridvankaradag/feat-defaultRichElement
Browse files Browse the repository at this point in the history
feat: add support for 'defaultRichTextElements' in IntlProvider
  • Loading branch information
stevensacks authored Nov 27, 2023
2 parents b98848f + e72018a commit b258ad2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/withReactIntl.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export const withReactIntl = (
const currentLocale = locale || defaultLocale;

if (currentLocale && reactIntl) {
const {formats, messages} = reactIntl;
const {formats, messages, defaultRichTextElements} = reactIntl;
const safeFormats = formats ? formats[currentLocale] : undefined;
if (messages) {
return (
Expand All @@ -28,6 +28,7 @@ export const withReactIntl = (
messages={messages[currentLocale]}
locale={currentLocale}
defaultLocale={defaultLocale}
defaultRichTextElements={defaultRichTextElements}
>
<>{story(context)}</>
</IntlProvider>
Expand Down

0 comments on commit b258ad2

Please sign in to comment.