1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-23 09:52:26 +01:00

[FLASK] Fix overflow issues with text coming from snap UI (#18169)

This commit is contained in:
Frederik Bolding 2023-03-16 11:45:44 +01:00 committed by GitHub
parent 872a8c79f4
commit dce4c6d7c5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 1 deletions

View File

@ -1,7 +1,10 @@
import React from 'react'; import React from 'react';
import PropTypes from 'prop-types'; import PropTypes from 'prop-types';
import ReactMarkdown from 'react-markdown'; import ReactMarkdown from 'react-markdown';
import { TypographyVariant } from '../../../../helpers/constants/design-system'; import {
TypographyVariant,
OVERFLOW_WRAP,
} from '../../../../helpers/constants/design-system';
import Typography from '../../../ui/typography/typography'; import Typography from '../../../ui/typography/typography';
const Paragraph = (props) => ( const Paragraph = (props) => (
@ -9,6 +12,7 @@ const Paragraph = (props) => (
{...props} {...props}
variant={TypographyVariant.H6} variant={TypographyVariant.H6}
className="snap-ui-markdown__text" className="snap-ui-markdown__text"
overflowWrap={OVERFLOW_WRAP.BREAK_WORD}
/> />
); );

View File

@ -9,6 +9,7 @@ import {
FONT_WEIGHT, FONT_WEIGHT,
DISPLAY, DISPLAY,
FLEX_DIRECTION, FLEX_DIRECTION,
OVERFLOW_WRAP,
} from '../../../../helpers/constants/design-system'; } from '../../../../helpers/constants/design-system';
import { SnapDelineator } from '../snap-delineator'; import { SnapDelineator } from '../snap-delineator';
import { useI18nContext } from '../../../../hooks/useI18nContext'; import { useI18nContext } from '../../../../hooks/useI18nContext';
@ -33,6 +34,7 @@ export const UI_MAPPING = {
props: { props: {
variant: TypographyVariant.H3, variant: TypographyVariant.H3,
fontWeight: FONT_WEIGHT.BOLD, fontWeight: FONT_WEIGHT.BOLD,
overflowWrap: OVERFLOW_WRAP.BREAK_WORD,
}, },
}), }),
text: (props) => ({ text: (props) => ({