mirror of
https://github.com/strapi/strapi.git
synced 2025-09-23 07:22:51 +00:00
38 lines
620 B
JavaScript
38 lines
620 B
JavaScript
/**
|
|
*
|
|
* InputSearchLi
|
|
*
|
|
*/
|
|
|
|
import React from 'react';
|
|
import PropTypes from 'prop-types';
|
|
import styles from './styles.scss';
|
|
|
|
function InputSearchLi({ item, onClickDelete }) {
|
|
return (
|
|
<li className={styles.li}>
|
|
<div>
|
|
<div>
|
|
{item.name}
|
|
</div>
|
|
<div onClick={() => onClickDelete(item)}>
|
|
<i className="fa fa-minus-circle" />
|
|
</div>
|
|
</div>
|
|
</li>
|
|
);
|
|
}
|
|
|
|
InputSearchLi.defaultProps = {
|
|
item: {
|
|
name: '',
|
|
}
|
|
}
|
|
|
|
InputSearchLi.proptypes = {
|
|
item: PropTypes.object,
|
|
onClickDelete: PropTypes.func.isRequired,
|
|
};
|
|
|
|
export default InputSearchLi;
|