import CloseIcon from "../../assets/images/CloseIcon.svg";

export default function FloatingItems({itemsList, containerClassName, itemClassName, onDelete}) {
    return (
        <div  className={'' + containerClassName}>
            {
                itemsList.map((name, index) => (
                    <div key={index}
                         className={'h-[2.6rem] flex flex-row items-center bg-gray-100 font-[Vazirmatn] text-sm rounded-lg p-2 mx-3 ' + itemClassName}>
                        <img alt={'close'} className={'ml-1'} src={CloseIcon} onClick={() => onDelete(name)}/>
                        <div className={'mb-1'}>
                            {name}
                        </div>
                    </div>
                ))
            }
        </div>
    )
}