mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-02 22:24:27 +01:00
7e7a0f1f72
* Allow custom UI for transaction insights * Fix margin * Small fixes to CSS and selectors * Rename property * Fix E2E locally * Bump test-snaps * Bump test-snaps
29 lines
655 B
JavaScript
29 lines
655 B
JavaScript
import React from 'react';
|
|
import PropTypes from 'prop-types';
|
|
import ReactMarkdown from 'react-markdown';
|
|
import { TYPOGRAPHY } from '../../../../helpers/constants/design-system';
|
|
import Typography from '../../../ui/typography/typography';
|
|
|
|
const Paragraph = (props) => (
|
|
<Typography
|
|
{...props}
|
|
variant={TYPOGRAPHY.H6}
|
|
className="snap-ui-markdown__text"
|
|
/>
|
|
);
|
|
|
|
export const SnapUIMarkdown = ({ children }) => {
|
|
return (
|
|
<ReactMarkdown
|
|
allowedElements={['p', 'strong', 'em']}
|
|
components={{ p: Paragraph }}
|
|
>
|
|
{children}
|
|
</ReactMarkdown>
|
|
);
|
|
};
|
|
|
|
SnapUIMarkdown.propTypes = {
|
|
children: PropTypes.string,
|
|
};
|