morty
26 строк · 642.0 Байт
1import React from "react";2import { Link } from "react-router-dom";3import "./modal.scss";4
5function Modal({ card, onClose }) {6return (7<div className="modal-overlay">8<div className="modal">9<div className="modal-content">10<span className="close" onClick={onClose}>11×12</span>13<div className="modal-info">14<h2 className="name">{card.name}</h2>15
16<Link to={`/card/${card.id}`}>17<button className="more">Подробнее</button>18</Link>19</div>20</div>21</div>22</div>23);24}
25
26export default Modal;27