1
0
Fork 1
mirror of https://github.com/SomboChea/ui synced 2024-06-02 09:35:06 +07:00
verdaccio-ui/src/components/DetailContainer/DetailContainerContentReadm...

20 lines
498 B
TypeScript
Raw Normal View History

import React from 'react';
import { preventXSS } from '../../utils/sec-utils';
import Readme from '../Readme';
2020-03-03 04:05:24 +07:00
import { ReadmeSpacing } from './styles';
interface Props {
description?: string;
}
const DetailContainerContentReadme: React.FC<Props> = ({ description }) => {
2020-03-03 04:05:24 +07:00
if (!description) {
return null;
}
const encodedReadme = preventXSS(description);
2020-03-03 04:05:24 +07:00
return <ReadmeSpacing><Readme description={encodedReadme} /></ReadmeSpacing>;
};
export default DetailContainerContentReadme;