JSFiddle - React, Tailwind, and code Playground
by Lena R
JavaScript
import React, { useState, useContext } from "react";
import styled from "styled-components";
import GenericButton from "../../../helpers/GenericButton";
import { ModalContext } from "../../../../context/ModalContext";
const Wrapper = styled.div`
background: #ffffff;
box-shadow: 10px 10px 20px #d1d9e6, -10px -10px 20px #ffffff;
padding: 20px;
border-radius: 10px;
-webkit-border-radius: 10px;
-moz-border-radius: 10px;
-o-border-radius: 10px;
`;
const SecondHeading = styled.h2`
font-weight: 600;
`;
const Form = styled.form`
margin-top: 20px;
width: 80%;
min-width: 280px;
max-width: 700px;
`;
const FieldWrapper = styled.div`
margin-top: 20px;
`;
const FiltersWrapper = styled.div`
z-index: 1;
display: flex;
justify-content: space-between;
margin: 20px 0;
`;
const Input = styled.input`
border-radius: 5px;
outline: none none;
border: inside 1px solid #becde2;
height: 40px;
padding: 10px;
margin-top: 10px;
width: 100%;
`;
const FilterButton = styled.div`
background: #e3e6ec;
box-shadow: 10px 10px 20px #d1d9e6, -10px -10px 20px #ffffff;
border-radius: 5px;
padding: 10px;
height: 50px;
display: flex;
align-self: center;
align-items: center;
text-align: center;
width: 140px;
cursor pointer;
font-weight: 400;
`;
const ButtonField = styled.div`
position: relative;
display: flex;
justify-content: flex-end;
`;
const Checkbox = styled.input`
width: 30px;
height: 30px;
appearance: none;
border: 1px solid #ccc;
margin-top: 10px;
background: #fff;
outline: none;
display: block;
&:checked {
background: #4070f4;
}
`;
const Span = styled.div`
display: flex;
justify-content: flex-end;
margin-top: -20px;
`;
const CheckboxsWrapperTag = styled.div`
background: #e3e6ec;
box-shadow: 10px 10px 20px #d1d9e6, -10px -10px 20px #ffffff;
border-radius: 5px;
display: ${(props) => (props.openSettingsPopupTag ? "block" : "none")};
position: absolute;
width: 200px;
padding:...