generated from TetiZ/vite-react-template
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
245 additions
and
246 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,67 +1,67 @@ | ||
// import Modal from "react-modal"; | ||
// import css from "./CreateCardModal.module.css"; | ||
// import * as Yup from 'yup'; | ||
// import { Form, Formik, Field } from "formik"; | ||
// import svg from "../../img/icons.svg"; | ||
import Modal from "react-modal"; | ||
import css from "./CreateCardModal.module.css"; | ||
import * as Yup from 'yup'; | ||
import { Form, Formik, Field } from "formik"; | ||
import svg from "../../img/icons.svg"; | ||
|
||
// Modal.setAppElement('#root'); | ||
Modal.setAppElement('#root'); | ||
|
||
// export const CreateCard = ({ isOpen, isClose }) => { | ||
// const columnModalValidation = Yup.object().shape({ | ||
// columnname: Yup.string().min(3, 'Too short!').max(20, 'Too long!').required('Required!') | ||
// }); | ||
export const CreateCard = ({ isOpen, isClose }) => { | ||
const columnModalValidation = Yup.object().shape({ | ||
columnname: Yup.string().min(3, 'Too short!').max(20, 'Too long!').required('Required!') | ||
}); | ||
|
||
// return ( | ||
// <> | ||
// <Modal isOpen={isOpen} onRequestClose={isClose} className={css.createCardModal} overlayClassName={css.createCardModalOverlay}> | ||
// <button className={css.createCardModalCloseBtn} type="button" onClick={isClose}> | ||
// <svg className={css.createCardModalIcon} width="18px" height="18px"> | ||
// <use href={svg + "#x-close"}></use> | ||
// </svg> | ||
// </button> | ||
// <div className={css.createCardModalContainer}> | ||
// <h1 className={css.createCardModalText}>Add card</h1> | ||
// <Formik | ||
// initialValues={{ cardtitle: '', carddescription: ''}} | ||
// validationSchema={columnModalValidation} | ||
// // onSubmit={(values, actions) => {}} | ||
// > | ||
// <Form autoComplete="off" className={css.createCardModalForm}> | ||
// <Field type='text' name='cardtitle' className={css.createCardModalInput1} placeholder="Title" /> | ||
// <Field as='textarea' name='carddescription' className={css.createCardModalInput2} placeholder="Description" /> | ||
// <label>Label color | ||
// <div className={css.createCardModalRadioContainer}> | ||
// <div> | ||
// <Field type="radio" className={css.createCardModalRadio1} id="createCardModalRadio1" name="color" /> | ||
// <label htmlFor="createCardModalRadio1" className="radio-label"></label> | ||
// </div> | ||
// <div> | ||
// <Field type="radio" className={css.createCardModalRadio2} id="createCardModalRadio2" name="color" /> | ||
// <label htmlFor="createCardModalRadio2" className="radio-label"></label> | ||
// </div> | ||
// <div> | ||
// <Field type="radio" className={css.createCardModalRadio3} id="createCardModalRadio3" name="color" /> | ||
// <label htmlFor="createCardModalRadio3" className="radio-label"></label> | ||
// </div> | ||
// <div> | ||
// <Field type="radio" className={css.createCardModalRadio4} id="createCardModalRadio4" name="color" /> | ||
// <label htmlFor="createCardModalRadio4" className="radio-label"></label> | ||
// </div> | ||
// </div> | ||
// </label> | ||
return ( | ||
<> | ||
<Modal isOpen={isOpen} onRequestClose={isClose} className={css.createCardModal} overlayClassName={css.createCardModalOverlay}> | ||
<button className={css.createCardModalCloseBtn} type="button" onClick={isClose}> | ||
<svg className={css.createCardModalIcon} width="18px" height="18px"> | ||
<use href={svg + "#x-close"}></use> | ||
</svg> | ||
</button> | ||
<div className={css.createCardModalContainer}> | ||
<h1 className={css.createCardModalText}>Add card</h1> | ||
<Formik | ||
initialValues={{ cardtitle: '', carddescription: ''}} | ||
validationSchema={columnModalValidation} | ||
// onSubmit={(values, actions) => {}} | ||
> | ||
<Form autoComplete="off" className={css.createCardModalForm}> | ||
<Field type='text' name='cardtitle' className={css.createCardModalInput1} placeholder="Title" /> | ||
<Field as='textarea' name='carddescription' className={css.createCardModalInput2} placeholder="Description" /> | ||
<label>Label color | ||
<div className={css.createCardModalRadioContainer}> | ||
<div> | ||
<Field type="radio" className={css.createCardModalRadio1} id="createCardModalRadio1" name="color" /> | ||
<label htmlFor="createCardModalRadio1" className="radio-label"></label> | ||
</div> | ||
<div> | ||
<Field type="radio" className={css.createCardModalRadio2} id="createCardModalRadio2" name="color" /> | ||
<label htmlFor="createCardModalRadio2" className="radio-label"></label> | ||
</div> | ||
<div> | ||
<Field type="radio" className={css.createCardModalRadio3} id="createCardModalRadio3" name="color" /> | ||
<label htmlFor="createCardModalRadio3" className="radio-label"></label> | ||
</div> | ||
<div> | ||
<Field type="radio" className={css.createCardModalRadio4} id="createCardModalRadio4" name="color" /> | ||
<label htmlFor="createCardModalRadio4" className="radio-label"></label> | ||
</div> | ||
</div> | ||
</label> | ||
|
||
// <button type="submit" className={css.createCardModalSubmit} onClick={() => isClose()}> | ||
// <span className={css.createCardModalSpan}> | ||
// <svg className={css.createCardModalAddIcon} width="14px" height="14px"> | ||
// <use href={svg + "#icon-plus"}></use> | ||
// </svg> | ||
// </span> | ||
// Add</button> | ||
// </Form> | ||
// </Formik> | ||
// </div> | ||
<button type="submit" className={css.createCardModalSubmit} onClick={() => isClose()}> | ||
<span className={css.createCardModalSpan}> | ||
<svg className={css.createCardModalAddIcon} width="14px" height="14px"> | ||
<use href={svg + "#icon-plus"}></use> | ||
</svg> | ||
</span> | ||
Add</button> | ||
</Form> | ||
</Formik> | ||
</div> | ||
|
||
// </Modal> | ||
// </> | ||
// ) | ||
// } | ||
</Modal> | ||
</> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,46 +1,46 @@ | ||
// import Modal from "react-modal"; | ||
// import css from "./CreateColumnModal.module.css"; | ||
// import * as Yup from 'yup'; | ||
// import { Form, Formik, Field } from "formik"; | ||
// import svg from "../../img/icons.svg"; | ||
import Modal from "react-modal"; | ||
import css from "./CreateColumnModal.module.css"; | ||
import * as Yup from 'yup'; | ||
import { Form, Formik, Field } from "formik"; | ||
import svg from "../../img/icons.svg"; | ||
|
||
// Modal.setAppElement('#root'); | ||
Modal.setAppElement('#root'); | ||
|
||
// export const CreateColumn = ({ isOpen, isClose }) => { | ||
// const columnModalValidation = Yup.object().shape({ | ||
// columnname: Yup.string().min(3, 'Too short!').max(20, 'Too long!').required('Required!') | ||
// }); | ||
export const CreateColumn = ({ isOpen, isClose }) => { | ||
const columnModalValidation = Yup.object().shape({ | ||
columnname: Yup.string().min(3, 'Too short!').max(20, 'Too long!').required('Required!') | ||
}); | ||
|
||
|
||
// return ( | ||
// <> | ||
// <Modal isOpen={isOpen} onRequestClose={() => isClose()} className={css.createColumnModal} overlayClassName={css.createColumnModalOverlay}> | ||
// <button className={css.createColumnModalCloseBtn} type="button" onClick={isClose}> | ||
// <svg className={css.createColumnModalIcon} width="18px" height="18px"> | ||
// <use href={svg + "#x-close"}></use> | ||
// </svg> | ||
// </button> | ||
// <div className={css.createColumnModalContainer}> | ||
// <h1 className={css.createColumnModalText}>Add column</h1> | ||
// <Formik | ||
// initialValues={{ columnname: ''}} | ||
// validationSchema={columnModalValidation} | ||
// portalClassName="createColumnModalContainer" | ||
// // onSubmit={(values, actions) => {}} | ||
// > | ||
// <Form autoComplete="off" className={css.createColumnModalForm}> | ||
// <Field type='text' name='columnname' className={css.createColumnModalInput} placeholder="Title" /> | ||
// <button type="submit" className={css.createColumnModalSubmit} onClick={() => isClose()}> | ||
// <span className={css.createColumnModalSpan}> | ||
// <svg className={css.createColumnModalAddIcon} width="14px" height="14px"> | ||
// <use href={svg + "#icon-plus"}></use> | ||
// </svg> | ||
// </span> | ||
// Add</button> | ||
// </Form> | ||
// </Formik> | ||
// </div> | ||
// </Modal> | ||
// </> | ||
// ) | ||
// } | ||
return ( | ||
<> | ||
<Modal isOpen={isOpen} onRequestClose={() => isClose()} className={css.createColumnModal} overlayClassName={css.createColumnModalOverlay}> | ||
<button className={css.createColumnModalCloseBtn} type="button" onClick={isClose}> | ||
<svg className={css.createColumnModalIcon} width="18px" height="18px"> | ||
<use href={svg + "#x-close"}></use> | ||
</svg> | ||
</button> | ||
<div className={css.createColumnModalContainer}> | ||
<h1 className={css.createColumnModalText}>Add column</h1> | ||
<Formik | ||
initialValues={{ columnname: ''}} | ||
validationSchema={columnModalValidation} | ||
portalClassName="createColumnModalContainer" | ||
// onSubmit={(values, actions) => {}} | ||
> | ||
<Form autoComplete="off" className={css.createColumnModalForm}> | ||
<Field type='text' name='columnname' className={css.createColumnModalInput} placeholder="Title" /> | ||
<button type="submit" className={css.createColumnModalSubmit} onClick={() => isClose()}> | ||
<span className={css.createColumnModalSpan}> | ||
<svg className={css.createColumnModalAddIcon} width="14px" height="14px"> | ||
<use href={svg + "#icon-plus"}></use> | ||
</svg> | ||
</span> | ||
Add</button> | ||
</Form> | ||
</Formik> | ||
</div> | ||
</Modal> | ||
</> | ||
) | ||
} |
Oops, something went wrong.