diff --git a/src/components/Footer/footer.scss b/src/components/Footer/footer.scss index 27ef198..0945b2c 100644 --- a/src/components/Footer/footer.scss +++ b/src/components/Footer/footer.scss @@ -1,6 +1,6 @@ .footer { padding: 50px 0 35px; - background-color: #4d4d4d; + background-color: #2f95f2; color: white; height: 450px; @@ -58,7 +58,7 @@ max-width: 250px; color: white; font-weight: 600; - background-color: gray; + background-color: #00529d; } } diff --git a/src/components/Header/header.scss b/src/components/Header/header.scss index 3e39013..5bb0533 100644 --- a/src/components/Header/header.scss +++ b/src/components/Header/header.scss @@ -1,6 +1,8 @@ .header { - background: gray; + background: #2f95f2; + padding: 10px 0; position: relative; + color: white; &__logo { font-size: 30px; @@ -45,7 +47,7 @@ border-radius: 50px; width: 30px; height: 30px; - background-color: #b0aeae; + background-color: #0d8afb; img { width: 28px; @@ -82,7 +84,7 @@ display: none; flex-direction: column; border-radius: 8px; - background-color: #d9d9d9; + background-color: #0270d5; padding: 10px; position: absolute; right: 10px; diff --git a/src/components/Modal/Modal.js b/src/components/Modal/Modal.js new file mode 100644 index 0000000..05c801e --- /dev/null +++ b/src/components/Modal/Modal.js @@ -0,0 +1,106 @@ +import React, {useState, useEffect} from "react"; + +import ModalLayout from "../ModalLayout/ModalLayout"; + +import closeImg from "../../assets/images/closeBurger.png" + +import "./modal.scss"; + +export const Modal = ({ + active, + close, + currentAuction, + setAuctionItems, + type +}) => { + const [newAuctionName, setNewAuctionName] = useState('') + const [addAuctionName, setAddNewAuctionName] = useState('') + useEffect(() => { + currentAuction ? setNewAuctionName(currentAuction.name) : setNewAuctionName('') + }, [currentAuction]) + + const onChangeHandler = (e) => { + setNewAuctionName(e.target.value) + } + + const editAuction = () => { + setAuctionItems((prevValue) => { + return prevValue.map((item) => { + if (item.number === currentAuction.number) { + return {...item, name: newAuctionName} + } + return item + }) + }) + close(false) + } + + const addNewAuction = () => { + setAuctionItems((prevValue) => [...prevValue, { + number: prevValue.length + 1, + name: addAuctionName, + receptionDate: '17.04.23-18.04.23', + startDate: '18.04.23', + status: 'Сбор заявок' + }]) + setAddNewAuctionName('') + close(false) + } + + return ( + +
+ close close(false)} /> + {type === 'edit' && +
+

Редактировать аукцион

+
+ Название аукциона* + +
+
+ Комментарий к аукциону* +