New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

create-easy-drop

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

create-easy-drop

A simple react component that accepts a list of password requirements and updates each as they are fulfilled

latest
npmnpm
Version
1.0.3
Version published
Weekly downloads
3
Maintainers
1
Weekly downloads
 
Created
Source

Logo

✅ Easy Drop

With Easy Drop, you can easily create drop-down menus for react applications. It is easy to use and customize.

Tech Stack

Client: React, Storybook, Rollup, Babel

License

MIT

Installation

Install create-easy-drop with npm

  npm i create-easy-drop

Documentation

import React, { useState } from "react";
export function EasyDropDown({ data, placeholder, label, name }) {
  const [display, setDisplay] = useState(false);
  const [inputeData, setInputeData] = useState(placeholder);
  return (
    <>
      <label htmlFor='department'>{label}</label>
      <input
        type='button'
        name={name}
        value={inputeData}
        className='inputBtn '
        onClick={(e) => {
          setDisplay(!display);
        }}
      />
      {display && (
        <ul className='optionList'>
          {data.map((dep, inidex) => {
            return (
              <li
                key={inidex}
                onClick={(e) => {
                  setInputeData(e.target.innerText);
                  setDisplay(!display);
                }}
              >
                {dep}
              </li>
            );
          })}
        </ul>
      )}
    </>
  );
}

Usage/Examples

<EasyDropDown data={department} placeholder={""} label={"Department"} />
.optionList {
  position: absolute;
  top: 60px;
  right: 0;
  width: 100%;
  z-index: 3;
}
ul {
  padding-left: 13px;
  border-bottom: 1px solid #ced4da;
  border-left: 1px solid #ced4da;
  border-right: 1px solid #ced4da;
  margin-top: -10px;
  padding-top: 20px;
  padding-bottom: 10px;
  list-style: none;
  background-color: #fff;
}
li {
  text-transform: uppercase;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.5;
  color: #212529;
}
li:hover {
  border: 1px solid #ced4da;
  border-radius: 0.375rem;
  padding: 0.375rem 0.75rem;
  font-size: 1.1rem;
  background-color: #dee3e7;
  cursor: pointer;
}
li:not(:last-child) {
  margin-bottom: 10px;
}
.activeState {
  display: none;
}

Authors

  • @AymanMoussa

FAQs

Package last updated on 27 Jun 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts