diff --git a/package.json b/package.json index 2187fc3..acf7987 100644 --- a/package.json +++ b/package.json @@ -13,6 +13,7 @@ "jalali-moment": "^3.3.10", "jol-player": "^2.5.0", "lodash": "^4.17.21", + "mapir-react-component": "^2.0.1", "react": "^17.0.2", "react-dom": "^17.0.2", "react-modern-drawer": "^1.0.1", diff --git a/src/App.scss b/src/App.scss index 3acf493..95cf680 100644 --- a/src/App.scss +++ b/src/App.scss @@ -63,6 +63,17 @@ src: url("./assets/font/IranSansX/Farsi/UltraLight.ttf"); } +//map +.mapboxgl-map{ + width: 100% !important; + height: 100% !important; + border-radius: 20px !important; + .marker{ + width: 20px; + height: 20px + } +} + .container{ width: 100%; margin : 0px auto; diff --git a/src/components/Input/index.js b/src/components/Input/index.js index 4d3c6d4..5b11969 100644 --- a/src/components/Input/index.js +++ b/src/components/Input/index.js @@ -30,6 +30,7 @@ export default function Input(props) { const [focusToggle, setFocusToggle] = useState(false); const { + backgroundColor, lang, theme, inputMode, @@ -42,6 +43,7 @@ export default function Input(props) { name, regex, direction, + width, } = props; return ( @@ -51,7 +53,7 @@ export default function Input(props) { " " )} > - + */} onChange(name, (e.target.value = regex(e.target.value))) } diff --git a/src/components/Map/index.js b/src/components/Map/index.js new file mode 100644 index 0000000..3dd254a --- /dev/null +++ b/src/components/Map/index.js @@ -0,0 +1,39 @@ +import Mapir from "mapir-react-component"; + +// import blueMark from '../../../assets/icons/marker-blue.png'; + +// import './index.scss'; + +const Map = Mapir.setToken({ + transformRequest: (url) => { + return { + url: url, + headers: { + "x-api-key": + "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6IjliNzIxYmZhZDZlMGI3MzYxMzFiMTMyNjEyZDQ1M2E3ZDg4YTEzMjc2ZDUyYTA5ZDNmOThiNWFjZTM1NDZlMmMwZDU2M2Y5YzY3N2U0NGFhIn0.eyJhdWQiOiIxNDc1OSIsImp0aSI6IjliNzIxYmZhZDZlMGI3MzYxMzFiMTMyNjEyZDQ1M2E3ZDg4YTEzMjc2ZDUyYTA5ZDNmOThiNWFjZTM1NDZlMmMwZDU2M2Y5YzY3N2U0NGFhIiwiaWF0IjoxNjI1NjY2NzI2LCJuYmYiOjE2MjU2NjY3MjYsImV4cCI6MTYyODI1ODcyNiwic3ViIjoiIiwic2NvcGVzIjpbImJhc2ljIl19.OIjSLWyNCGALY2C0EFDGPEEUbPqOxL6GxCDkeX1B5C218eTk0qkmlGs8z4E87Y-qL7_PG814UZwcngjdRybVwabMtgfHsJj7DRDtrdBzCW7HRlJXqrSRG7xOuJmFhcn4-HtXRQUOEUn8quQukXPek8zvMtRBoMNsefS5s6es2oAg7Fmv0o5T2uZyDzMnRAfrTb1SKtv52Q_yXWYPtQNZdZcwe9Ed-ZkGeAXuTY2tafow92Oq8mmRxrzaq9Ne3gtu98UqXA3rwzRaQ1ToXU_Tcjh5UCVS6hZAzhI-GQk7KfrLbOOyDCxfd9v7_qXnIkRR6dd3bZ69H-jvlytaxMl51Q", //Mapir api key + "Mapir-SDK": "reactjs", + }, + }; + }, +}); + +export default function location() { + return ( + + + + ); +} \ No newline at end of file diff --git a/src/components/OR/index.js b/src/components/OR/index.js index 35e1efb..7e59a98 100644 --- a/src/components/OR/index.js +++ b/src/components/OR/index.js @@ -2,11 +2,11 @@ import React, { useState } from "react"; function OR({}) { return ( -
+
- + یا
+ + +
+ ); +} diff --git a/src/components/Switch/index.scss b/src/components/Switch/index.scss new file mode 100644 index 0000000..86b36a1 --- /dev/null +++ b/src/components/Switch/index.scss @@ -0,0 +1,52 @@ +// *, *:after, *:before { +// // box-sizing: border-box; +// } + +// body { +// min-height: 100vh; +// display: flex; +// align-items: center; +// justify-content: center; +// } + +.switch { + position: relative; + input[type="checkbox"] { + visibility: hidden; + position: absolute; + &:checked + label { + transform: rotate(0deg); + background-color: #000; + &:before { + transform: translateX(35.5px); + background-color: #fff; + } + } + } + + label { + display: flex; + width: 70px; + height: 34px; + border: 3px solid; + border-radius: 99em; + position: relative; + transition: transform 0.3s ease-in-out; + transform-origin: 50% 50%; + cursor: pointer; + + &:before { + transition: transform 0.3s ease; + transition-delay: 0s; + content: ""; + display: block; + position: absolute; + width: 24px; + height: 24px; + background-color: #000; + border-radius: 50%; + top: 2px; + left: 3px; + } + } +} diff --git a/src/components/Textarea/index.js b/src/components/Textarea/index.js index 72573ce..c2574ae 100644 --- a/src/components/Textarea/index.js +++ b/src/components/Textarea/index.js @@ -1,19 +1,19 @@ import React from "react"; import _ from "lodash"; -export default function Textarea({ placeholder, theme }) { +export default function Textarea({ placeholder, theme, backgroundColor }) { const light = theme === "light"; return ( <>