update 2 files and delete 4 files

master
mahdi andalib 3 years ago
parent 2669aa4853
commit bb58b9a5f6
  1. 2
      src/components/Navbar/HeaderDesign2/index.js
  2. 57
      src/components/Switch/index.css
  3. 9
      src/components/Switch/index.css.map
  4. 0
      src/components/Switch/index.scss
  5. 2
      src/components/SwitchDesign/Switch/index.js
  6. 25
      src/components/SwitchDesign/index.js
  7. 11
      src/redux/data.js

@ -1,5 +1,5 @@
import React from "react";
import Switch from "../../Switch";
import Switch from "../../SwitchDesign/Switch";
import Search from "../../SearchDesign/Search";
const HeaderDesign2 = ({ username, userJob, menuItems }) => {

@ -1,57 +0,0 @@
.switch {
position: relative;
}
.switch input[type="checkbox"] {
visibility: hidden;
position: absolute;
}
.switch input[type="checkbox"]:checked + label {
-webkit-transform: rotate(0deg);
transform: rotate(0deg);
background-color: #000;
}
.switch input[type="checkbox"]:checked + label:before {
-webkit-transform: translateX(35.5px);
transform: translateX(35.5px);
background-color: #fff;
}
.switch label {
display: -webkit-box;
display: -ms-flexbox;
display: flex;
width: 70px;
height: 34px;
border: 3px solid;
border-radius: 99em;
position: relative;
-webkit-transition: -webkit-transform 0.3s ease-in-out;
transition: -webkit-transform 0.3s ease-in-out;
transition: transform 0.3s ease-in-out;
transition: transform 0.3s ease-in-out, -webkit-transform 0.3s ease-in-out;
-webkit-transform-origin: 50% 50%;
transform-origin: 50% 50%;
cursor: pointer;
}
.switch label:before {
-webkit-transition: -webkit-transform 0.3s ease;
transition: -webkit-transform 0.3s ease;
transition: transform 0.3s ease;
transition: transform 0.3s ease, -webkit-transform 0.3s ease;
-webkit-transition-delay: 0s;
transition-delay: 0s;
content: "";
display: block;
position: absolute;
width: 24px;
height: 24px;
background-color: #000;
border-radius: 50%;
top: 2px;
left: 3px;
}
/*# sourceMappingURL=index.css.map */

@ -1,9 +0,0 @@
{
"version": 3,
"mappings": "AAWA,AAAA,OAAO,CAAC;EACP,QAAQ,EAAE,QAAQ;CAuClB;;AAxCD,AAEE,OAFK,CAEL,KAAK,CAAA,AAAA,IAAC,CAAK,UAAU,AAAf,EAAiB;EACrB,UAAU,EAAE,MAAM;EACrB,QAAQ,EAAG,QAAQ;CASjB;;AAbH,AAKI,OALG,CAEL,KAAK,CAAA,AAAA,IAAC,CAAK,UAAU,AAAf,CAGH,QAAQ,GAAG,KAAK,CAAC;EAChB,SAAS,EAAE,YAAY;EACvB,gBAAgB,EAAE,IAAI;CAKvB;;AAZL,AAQM,OARC,CAEL,KAAK,CAAA,AAAA,IAAC,CAAK,UAAU,AAAf,CAGH,QAAQ,GAAG,KAAK,AAGd,OAAO,CAAC;EACP,SAAS,EAAE,kBAAkB;EAC7B,gBAAgB,EAAE,IAAI;CACvB;;AAXP,AAeE,OAfK,CAeL,KAAK,CAAC;EACJ,OAAO,EAAE,IAAI;EACb,KAAK,EAAE,IAAI;EACX,MAAM,EAAE,IAAI;EACZ,MAAM,EAAE,SAAS;EACjB,aAAa,EAAE,IAAI;EACnB,QAAQ,EAAE,QAAQ;EAClB,UAAU,EAAE,0BAA0B;EACtC,gBAAgB,EAAE,OAAO;EACzB,MAAM,EAAE,OAAO;CAehB;;AAvCH,AA0BI,OA1BG,CAeL,KAAK,AAWF,OAAO,CAAC;EACP,UAAU,EAAE,mBAAmB;EAC/B,gBAAgB,EAAE,EAAE;EACpB,OAAO,EAAE,EAAE;EACX,OAAO,EAAE,KAAK;EACd,QAAQ,EAAE,QAAQ;EAClB,KAAK,EAAE,IAAI;EACX,MAAM,EAAE,IAAI;EACZ,gBAAgB,EAAE,IAAI;EACtB,aAAa,EAAE,GAAG;EAClB,GAAG,EAAE,GAAG;EACR,IAAI,EAAE,GAAG;CACV",
"sources": [
"index.scss"
],
"names": [],
"file": "index.css"
}

@ -1,7 +1,5 @@
// it has style inside index.scss ---> // Start Switch && end Switch
import React from "react";
import "./index.scss";
const Switch = () => {
return (

@ -0,0 +1,25 @@
import React, { useState } from "react";
import Switch from "./Switch";
function SwitchDesign() {
const list = {
1: <Switch />,
};
const [type, setType] = useState(1);
return (
<div className="w-full flex flex-col items-center">
<select
className="mb-10 w-20 bg-gray-200"
onChange={(e) => setType(e.target.value)}
>
{Object.keys(list).map((option, index) => (
<option key={index}>{option}</option>
))}
</select>
{list[type]}
</div>
);
}
export default SwitchDesign;

@ -20,6 +20,7 @@ import FooterDesign from "../components/FooterDesign";
import Input from "../components/Input";
import Navbar from "../components/Navbar";
import SearchDesign from "../components/SearchDesign";
import SwitchDesign from "../components/SwitchDesign";
// mini components
import MiniComponents from "../components/MiniComponents";
@ -533,6 +534,16 @@ const components = [
code: null,
},
},
{
name: "Switch Design",
author: "Andalib/Ashrafi",
props: [],
content: {
name: "Switch Design",
component: <SwitchDesign />,
code: null,
},
},
// mini components
{
name: "Mini Components",

Loading…
Cancel
Save