diff --git a/frontend/src/components/Chip.jsx b/frontend/src/components/Chip.jsx new file mode 100644 index 0000000..57dc831 --- /dev/null +++ b/frontend/src/components/Chip.jsx @@ -0,0 +1,16 @@ +import React from 'react'; +import PropTypes from 'prop-types'; + +export default function Chip(props) { + const { label } = props; + + return ( + + {label} + + ); +} + +Chip.propTypes = { + label: PropTypes.string.isRequired, +}; diff --git a/frontend/src/components/Package.jsx b/frontend/src/components/Package.jsx index 36882a8..4933156 100644 --- a/frontend/src/components/Package.jsx +++ b/frontend/src/components/Package.jsx @@ -1,6 +1,7 @@ import React from 'react'; import PropTypes from 'prop-types'; import { Link } from 'react-router-dom'; +import Chip from './Chip'; export default function Package(props) { const { data, showRequest } = props; @@ -29,30 +30,22 @@ export default function Package(props) { - {showRequest ? ( + {