ocr-p14-dropdown-npm
Advanced tools
Comparing version 2.5.0 to 2.6.0
@@ -11,3 +11,3 @@ "use strict"; | ||
var _propTypes = _interopRequireDefault(require("prop-types")); | ||
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6; | ||
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7; | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } | ||
@@ -35,2 +35,3 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } | ||
var SearchBar = _styledComponents["default"].input(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n width: 40%;\n height: 15px;\n position: absolute;\n top: 0;\n right: 0;\n border: solid 1px #242424;\n border-radius: 0 0px 0px 10px;\n background-color: #babbbe;\n color: black;\n padding: 5px;\n box-sizing: initial;\n"]))); | ||
var NoDataErrMsg = _styledComponents["default"].p(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n color: white;\n"]))); | ||
var Dropdown = function Dropdown(_ref) { | ||
@@ -153,5 +154,5 @@ var dropdownData = _ref.dropdownData, | ||
}, elem)); | ||
}) : "No content to display after search") : ""); | ||
}) : /*#__PURE__*/_react["default"].createElement(NoDataErrMsg, null, "No content to display after search")) : ""); | ||
}; | ||
var _default = Dropdown; | ||
exports["default"] = _default; |
{ | ||
"name": "ocr-p14-dropdown-npm", | ||
"version": "2.5.0", | ||
"version": "2.6.0", | ||
"repository": { | ||
@@ -5,0 +5,0 @@ "type": "git", |
@@ -74,2 +74,6 @@ import React, { useState, useEffect, useRef } from "react"; | ||
const NoDataErrMsg = styled.p` | ||
color: white; | ||
`; | ||
const Dropdown = ({ dropdownData, onChange, onReset = false, name, id }) => { | ||
@@ -178,17 +182,19 @@ Dropdown.propTypes = { | ||
/> | ||
{filteredDropdownData.length && filteredDropdownData.length > 0 | ||
? filteredDropdownData.map((elem, index) => { | ||
return ( | ||
<DropdownSelectionContainer | ||
className="dropdownMenu__selectionContainer" | ||
key={`dropdownMenu__selectionContainer` + index} | ||
onClick={(e) => handleSelectionClick(e)} | ||
> | ||
<DropdownSelection className="drodownMenu__selection"> | ||
{elem} | ||
</DropdownSelection> | ||
</DropdownSelectionContainer> | ||
); | ||
}) | ||
: "No content to display after search"} | ||
{filteredDropdownData.length && filteredDropdownData.length > 0 ? ( | ||
filteredDropdownData.map((elem, index) => { | ||
return ( | ||
<DropdownSelectionContainer | ||
className="dropdownMenu__selectionContainer" | ||
key={`dropdownMenu__selectionContainer` + index} | ||
onClick={(e) => handleSelectionClick(e)} | ||
> | ||
<DropdownSelection className="drodownMenu__selection"> | ||
{elem} | ||
</DropdownSelection> | ||
</DropdownSelectionContainer> | ||
); | ||
}) | ||
) : ( | ||
<NoDataErrMsg>No content to display after search</NoDataErrMsg> | ||
)} | ||
</DropdownMenu> | ||
@@ -195,0 +201,0 @@ ) : ( |
21066
350