From 85be3fe95a0e97197044c208f0d8f891e39847f0 Mon Sep 17 00:00:00 2001 From: jimmys-box <89916651+jimmys-box@users.noreply.github.com> Date: Tue, 19 Apr 2022 17:08:44 +0200 Subject: [PATCH] details: --- components/form/CandidateField.jsx | 17 +++-- components/form/CandidatesField.jsx | 8 +-- components/form/ConfirmModal.jsx | 15 ++-- package-lock.json | 106 ++++++++++++++++++++++++++-- package.json | 1 + pages/new/index.js | 11 +-- styles/scss/_newVote.scss | 62 ++++++++++++++-- 7 files changed, 189 insertions(+), 31 deletions(-) diff --git a/components/form/CandidateField.jsx b/components/form/CandidateField.jsx index 9dc42cd..beb215a 100644 --- a/components/form/CandidateField.jsx +++ b/components/form/CandidateField.jsx @@ -68,6 +68,7 @@ const CandidateField = ({avatar, label, description, candIndex, onDelete, onAdd, const removeCandidate = () => { onDelete(); toggle(); + } @@ -82,8 +83,15 @@ const CandidateField = ({avatar, label, description, candIndex, onDelete, onAdd, setCreateObjectURL(URL.createObjectURL(i)); } }; -const test = {...inputProps}; -console.log(test); + + + + + + + + + return (
@@ -147,11 +155,8 @@ console.log(test); diff --git a/components/form/CandidatesField.jsx b/components/form/CandidatesField.jsx index 07c577c..d49043a 100644 --- a/components/form/CandidatesField.jsx +++ b/components/form/CandidatesField.jsx @@ -73,14 +73,14 @@ const CandidatesField = ({onChange}) => { const handleKeyPress = (e, index) => { if (e.key === "Enter") { e.preventDefault(); - if (index + 1 === candidates.length) { + if (index + 2 === candidates.length) { addCandidate(); } else { - candidates[index + 1].fieldRef.current.focus(); - } + + }candidates[index + 1].fieldRef.current.focus(); } - + } const onSortEnd = ({oldIndex, newIndex}) => { diff --git a/components/form/ConfirmModal.jsx b/components/form/ConfirmModal.jsx index 3d81fd7..badcffa 100644 --- a/components/form/ConfirmModal.jsx +++ b/components/form/ConfirmModal.jsx @@ -114,14 +114,19 @@ const ConfirmModal = ({ CreateElection, handleRestrictResultCheck, handleIsTimeL
-
-

diff --git a/styles/scss/_newVote.scss b/styles/scss/_newVote.scss index 260778a..d5818a0 100644 --- a/styles/scss/_newVote.scss +++ b/styles/scss/_newVote.scss @@ -455,6 +455,11 @@ line-height: 24px; font-size: 15px; line-height: 24px; color: #2400FD; + width: 100%; +} +.recap-vote-content .cancelButton { + color: #8F88BA; + } .modal-footer { border-top: none; @@ -560,7 +565,8 @@ z-index: 3; content: ''; border-radius: 30px; background-color: #FFF; } - input[type=radio]:last-of-type:checked ~ .radio-switch { background-color: #4af } + input[type=radio]:last-of-type:checked ~ .radio-switch { background-color: #2708E4; + } input[type=radio]:last-of-type:checked ~ .radio-switch:before { right: 2px } .radio-group > label { @@ -619,6 +625,53 @@ line-height: 24px!important; } .rightColumn { padding-left: 15px; +} +.react-multi-email { + border: none!important; + border-bottom: solid 2px #C3BFD8!important; + + border-radius: 0px!important; +} +.react-multi-email [data-tag] { + color: #2400FD!important; + font-weight: 700; +font-size: 14px; +line-height: 24px; +} +.react-datepicker__header { + background: none!important; + border: none!important; +} +.react-datepicker__navigation-icon::before { + top: 12px!important; + border-color: #2400FD!important; +} +.react-datepicker__day--selected { + background-color: #2400FD!important; + border-radius: 0px!important; + color: white!important; +} +.react-datepicker__day { + font-weight: 500!important; +font-size: 18px!important; +line-height: 100%!important; +color: #0A004C; +width: 44px; +height: 44px; +padding: 11px!important; +} +.react-datepicker__day-name { + font-weight: 700!important; +font-size: 14px!important; +line-height: 100%!important; +color: #0A004C; +width: 44px; +opacity: 0.4; +padding: 11px!important; +} +.recap-vote-content .badge:first-of-type { + color: #8F88BA!important; + text-decoration: line-through; } @media screen and (min-width: 619px) and (max-width: 1120px) { .btn-return-candidates { @@ -768,12 +821,7 @@ color: #2400FD; font-size: 35px; font-weight: 100; } - .react-multi-email { - border: none!important; - border-bottom: solid 2px #C3BFD8!important; - - border-radius: 0px!important; - } + .btn-confirm-mobile { width: 100%;