diff --git a/src/renderer/src/components/plugins/Plugin.jsx b/src/renderer/src/components/plugins/Plugin.jsx index 5c03472f..9d676381 100644 --- a/src/renderer/src/components/plugins/Plugin.jsx +++ b/src/renderer/src/components/plugins/Plugin.jsx @@ -9,7 +9,7 @@ import { Button, ModalDirectional } from '@platformatic/ui-components' import { useState } from 'react' import PluginDetail from './PluginDetail' -function Plugin ({ name, onClickCardPlugin, isSelected, description, tags, author, homepage }) { +function Plugin ({ name, onClickCardPlugin, isSelected, description, tags, author, homepage, downloads }) { const [showModalDetail, setShowModalDetail] = useState(false) let className = `${commonStyles.smallFlexBlock} ${styles.container} ` className += isSelected ? styles.selected : styles.unSelected @@ -59,6 +59,7 @@ function Plugin ({ name, onClickCardPlugin, isSelected, description, tags, autho tags={tags} author={author} homepage={homepage} + downloads={downloads} onClickSelectPlugin={() => handleClickSelectPluginDetail()} /> @@ -91,8 +92,14 @@ Plugin.propTypes = { /** * homepage */ - homepage: PropTypes.string - + homepage: PropTypes.string, + /** + * downloads + */ + downloads: PropTypes.oneOfType([ + PropTypes.string, + PropTypes.number + ]) } Plugin.defaultProps = { @@ -101,6 +108,7 @@ Plugin.defaultProps = { description: '', tags: [], author: '', + downloads: 0, homepage: '' } diff --git a/src/renderer/src/components/plugins/PluginDetail.jsx b/src/renderer/src/components/plugins/PluginDetail.jsx index c9a0ecfe..e2e91667 100644 --- a/src/renderer/src/components/plugins/PluginDetail.jsx +++ b/src/renderer/src/components/plugins/PluginDetail.jsx @@ -7,7 +7,7 @@ import Title from '~/components/ui/Title' import { Button, HorizontalSeparator, Icons, Tag, VerticalSeparator } from '@platformatic/ui-components' import { MARGIN_0, OPACITY_30, RICH_BLACK, SMALL, TERTIARY_BLUE, WHITE } from '@platformatic/ui-components/src/components/constants' -function PluginDetail ({ name, description, tags, author, homepage, onClickSelectPlugin }) { +function PluginDetail ({ name, description, tags, author, homepage, downloads, onClickSelectPlugin }) { return (
{description}
{description}