🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
Sign In

magic-select

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

magic-select - npm Package Compare versions

Comparing version
1.0.9
to
1.0.10
+0
-1
dist/index.d.ts
import React from 'react';
import './selectComponent.css';
export declare type OptionType = {

@@ -4,0 +3,0 @@ value: string;

+18
-2

@@ -13,5 +13,21 @@ function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }

return React.createElement("div", null, React.createElement("label", {
className: "label"
style: {
fontSize: "0.67",
fontWeight: 500,
color: "#222",
textAlign: "center",
marginBottom: "10px"
}
}, label), React.createElement("select", {
className: "selectContainer",
style: {
borderRadius: "4px",
border: "1px solid #e0e0e0",
height: "40px",
width: "100%",
color: "#000",
fontSize: "0.87",
fontWeight: 400,
textAlign: "center",
boxShadow: "0 10px 10px rgba(0,0,0,0.6)"
},
onChange: handleSelectOption

@@ -18,0 +34,0 @@ }, optionsToDisplay === null || optionsToDisplay === void 0 ? void 0 : optionsToDisplay.map(function (option) {

@@ -1,1 +0,1 @@

{"version":3,"file":"index.js","sources":["../src/index.tsx"],"sourcesContent":["import React from 'react'\nimport './selectComponent.css'\n\n\nexport type OptionType = {\n value: string;\n}\n\ntype SelectProps = {\n optionsToDisplay: OptionType[];\n triggerCurrentOption: (value: string) => void;\n label: string;\n}\n\n/**\n * \n * @param optionsToDisplay \n * @param triggerCurrentOption\n * @param label\n * @returns \n */\nexport default function SelectComponent({ optionsToDisplay, triggerCurrentOption, label }: SelectProps) {\n\n const handleSelectOption = (e: React.ChangeEvent<HTMLSelectElement>) => {\n triggerCurrentOption(e.target.value)\n }\n\n return (\n <div>\n <label className=\"label\">{label}</label>\n <select className=\"selectContainer\" onChange={handleSelectOption}>\n {optionsToDisplay?.map((option) => (\n <option key={option.value} value={option.value} >\n {option.value}\n </option>\n ))}\n </select>\n </div>\n )\n}\n\n"],"names":["SelectComponent","_ref","optionsToDisplay","triggerCurrentOption","label","handleSelectOption","e","target","value","React","className","onChange","map","option","key"],"mappings":";;;;SAqBwBA,eAAeA,CAAAC,IAAA;MAAGC,gBAAgB,GAAAD,IAAA,CAAhBC,gBAAgB;IAAEC,oBAAoB,GAAAF,IAAA,CAApBE,oBAAoB;IAAEC,KAAK,GAAAH,IAAA,CAALG,KAAK;EAErF,IAAMC,kBAAkB,GAAG,SAArBA,kBAAkBA,CAAIC,CAAuC;IACjEH,oBAAoB,CAACG,CAAC,CAACC,MAAM,CAACC,KAAK,CAAC;GACrC;EAED,OACEC,iCACEA;IAAOC,SAAS,EAAC;KAASN,KAAK,CAAS,EACxCK;IAAQC,SAAS,EAAC,iBAAiB;IAACC,QAAQ,EAAEN;KAC3CH,gBAAgB,aAAhBA,gBAAgB,uBAAhBA,gBAAgB,CAAEU,GAAG,CAAC,UAACC,MAAM;IAAA,OAC5BJ;MAAQK,GAAG,EAAED,MAAM,CAACL,KAAK;MAAEA,KAAK,EAAEK,MAAM,CAACL;OACtCK,MAAM,CAACL,KAAK,CACN;GACV,CAAC,CACK,CACL;AAEV;;;;"}
{"version":3,"file":"index.js","sources":["../src/index.tsx"],"sourcesContent":["import React from 'react'\n\nexport type OptionType = {\n value: string;\n}\n\ntype SelectProps = {\n optionsToDisplay: OptionType[];\n triggerCurrentOption: (value: string) => void;\n label: string;\n}\n\n/**\n * \n * @param optionsToDisplay \n * @param triggerCurrentOption\n * @param label\n * @returns \n */\nexport default function SelectComponent({ optionsToDisplay, triggerCurrentOption, label }: SelectProps) {\n\n const handleSelectOption = (e: React.ChangeEvent<HTMLSelectElement>) => {\n triggerCurrentOption(e.target.value)\n }\n\n return (\n <div>\n <label style={{ fontSize: \"0.67\", fontWeight: 500, color: \"#222\", textAlign: \"center\", marginBottom: \"10px\" }}>{label}</label>\n <select style={{ borderRadius: \"4px\", border: \"1px solid #e0e0e0\", height: \"40px\", width: \"100%\", color: \"#000\", fontSize: \"0.87\", fontWeight: 400, textAlign: \"center\", boxShadow: \"0 10px 10px rgba(0,0,0,0.6)\" }} onChange={handleSelectOption}>\n {optionsToDisplay?.map((option) => (\n <option key={option.value} value={option.value} >\n {option.value}\n </option>\n ))}\n </select>\n </div>\n )\n}\n\n"],"names":["SelectComponent","_ref","optionsToDisplay","triggerCurrentOption","label","handleSelectOption","e","target","value","React","style","fontSize","fontWeight","color","textAlign","marginBottom","borderRadius","border","height","width","boxShadow","onChange","map","option","key"],"mappings":";;;;SAmBwBA,eAAeA,CAAAC,IAAA;MAAGC,gBAAgB,GAAAD,IAAA,CAAhBC,gBAAgB;IAAEC,oBAAoB,GAAAF,IAAA,CAApBE,oBAAoB;IAAEC,KAAK,GAAAH,IAAA,CAALG,KAAK;EAErF,IAAMC,kBAAkB,GAAG,SAArBA,kBAAkBA,CAAIC,CAAuC;IACjEH,oBAAoB,CAACG,CAAC,CAACC,MAAM,CAACC,KAAK,CAAC;GACrC;EAED,OACEC,iCACEA;IAAOC,KAAK,EAAE;MAAEC,QAAQ,EAAE,MAAM;MAAEC,UAAU,EAAE,GAAG;MAAEC,KAAK,EAAE,MAAM;MAAEC,SAAS,EAAE,QAAQ;MAAEC,YAAY,EAAE;;KAAWX,KAAK,CAAS,EAC9HK;IAAQC,KAAK,EAAE;MAAEM,YAAY,EAAE,KAAK;MAAEC,MAAM,EAAE,mBAAmB;MAAEC,MAAM,EAAE,MAAM;MAAEC,KAAK,EAAE,MAAM;MAAEN,KAAK,EAAE,MAAM;MAAEF,QAAQ,EAAE,MAAM;MAAEC,UAAU,EAAE,GAAG;MAAEE,SAAS,EAAE,QAAQ;MAAEM,SAAS,EAAE;KAA+B;IAAEC,QAAQ,EAAEhB;KAC5NH,gBAAgB,aAAhBA,gBAAgB,uBAAhBA,gBAAgB,CAAEoB,GAAG,CAAC,UAACC,MAAM;IAAA,OAC5Bd;MAAQe,GAAG,EAAED,MAAM,CAACf,KAAK;MAAEA,KAAK,EAAEe,MAAM,CAACf;OACtCe,MAAM,CAACf,KAAK,CACN;GACV,CAAC,CACK,CACL;AAEV;;;;"}

@@ -11,5 +11,21 @@ import React from 'react';

return React.createElement("div", null, React.createElement("label", {
className: "label"
style: {
fontSize: "0.67",
fontWeight: 500,
color: "#222",
textAlign: "center",
marginBottom: "10px"
}
}, label), React.createElement("select", {
className: "selectContainer",
style: {
borderRadius: "4px",
border: "1px solid #e0e0e0",
height: "40px",
width: "100%",
color: "#000",
fontSize: "0.87",
fontWeight: 400,
textAlign: "center",
boxShadow: "0 10px 10px rgba(0,0,0,0.6)"
},
onChange: handleSelectOption

@@ -16,0 +32,0 @@ }, optionsToDisplay === null || optionsToDisplay === void 0 ? void 0 : optionsToDisplay.map(function (option) {

@@ -1,1 +0,1 @@

{"version":3,"file":"index.modern.js","sources":["../src/index.tsx"],"sourcesContent":["import React from 'react'\nimport './selectComponent.css'\n\n\nexport type OptionType = {\n value: string;\n}\n\ntype SelectProps = {\n optionsToDisplay: OptionType[];\n triggerCurrentOption: (value: string) => void;\n label: string;\n}\n\n/**\n * \n * @param optionsToDisplay \n * @param triggerCurrentOption\n * @param label\n * @returns \n */\nexport default function SelectComponent({ optionsToDisplay, triggerCurrentOption, label }: SelectProps) {\n\n const handleSelectOption = (e: React.ChangeEvent<HTMLSelectElement>) => {\n triggerCurrentOption(e.target.value)\n }\n\n return (\n <div>\n <label className=\"label\">{label}</label>\n <select className=\"selectContainer\" onChange={handleSelectOption}>\n {optionsToDisplay?.map((option) => (\n <option key={option.value} value={option.value} >\n {option.value}\n </option>\n ))}\n </select>\n </div>\n )\n}\n\n"],"names":["SelectComponent","_ref","optionsToDisplay","triggerCurrentOption","label","handleSelectOption","e","target","value","React","className","onChange","map","option","key"],"mappings":";;SAqBwBA,eAAeA,CAAAC,IAAA;MAAGC,gBAAgB,GAAAD,IAAA,CAAhBC,gBAAgB;IAAEC,oBAAoB,GAAAF,IAAA,CAApBE,oBAAoB;IAAEC,KAAK,GAAAH,IAAA,CAALG,KAAK;EAErF,IAAMC,kBAAkB,GAAG,SAArBA,kBAAkBA,CAAIC,CAAuC;IACjEH,oBAAoB,CAACG,CAAC,CAACC,MAAM,CAACC,KAAK,CAAC;GACrC;EAED,OACEC,iCACEA;IAAOC,SAAS,EAAC;KAASN,KAAK,CAAS,EACxCK;IAAQC,SAAS,EAAC,iBAAiB;IAACC,QAAQ,EAAEN;KAC3CH,gBAAgB,aAAhBA,gBAAgB,uBAAhBA,gBAAgB,CAAEU,GAAG,CAAC,UAACC,MAAM;IAAA,OAC5BJ;MAAQK,GAAG,EAAED,MAAM,CAACL,KAAK;MAAEA,KAAK,EAAEK,MAAM,CAACL;OACtCK,MAAM,CAACL,KAAK,CACN;GACV,CAAC,CACK,CACL;AAEV;;;;"}
{"version":3,"file":"index.modern.js","sources":["../src/index.tsx"],"sourcesContent":["import React from 'react'\n\nexport type OptionType = {\n value: string;\n}\n\ntype SelectProps = {\n optionsToDisplay: OptionType[];\n triggerCurrentOption: (value: string) => void;\n label: string;\n}\n\n/**\n * \n * @param optionsToDisplay \n * @param triggerCurrentOption\n * @param label\n * @returns \n */\nexport default function SelectComponent({ optionsToDisplay, triggerCurrentOption, label }: SelectProps) {\n\n const handleSelectOption = (e: React.ChangeEvent<HTMLSelectElement>) => {\n triggerCurrentOption(e.target.value)\n }\n\n return (\n <div>\n <label style={{ fontSize: \"0.67\", fontWeight: 500, color: \"#222\", textAlign: \"center\", marginBottom: \"10px\" }}>{label}</label>\n <select style={{ borderRadius: \"4px\", border: \"1px solid #e0e0e0\", height: \"40px\", width: \"100%\", color: \"#000\", fontSize: \"0.87\", fontWeight: 400, textAlign: \"center\", boxShadow: \"0 10px 10px rgba(0,0,0,0.6)\" }} onChange={handleSelectOption}>\n {optionsToDisplay?.map((option) => (\n <option key={option.value} value={option.value} >\n {option.value}\n </option>\n ))}\n </select>\n </div>\n )\n}\n\n"],"names":["SelectComponent","_ref","optionsToDisplay","triggerCurrentOption","label","handleSelectOption","e","target","value","React","style","fontSize","fontWeight","color","textAlign","marginBottom","borderRadius","border","height","width","boxShadow","onChange","map","option","key"],"mappings":";;SAmBwBA,eAAeA,CAAAC,IAAA;MAAGC,gBAAgB,GAAAD,IAAA,CAAhBC,gBAAgB;IAAEC,oBAAoB,GAAAF,IAAA,CAApBE,oBAAoB;IAAEC,KAAK,GAAAH,IAAA,CAALG,KAAK;EAErF,IAAMC,kBAAkB,GAAG,SAArBA,kBAAkBA,CAAIC,CAAuC;IACjEH,oBAAoB,CAACG,CAAC,CAACC,MAAM,CAACC,KAAK,CAAC;GACrC;EAED,OACEC,iCACEA;IAAOC,KAAK,EAAE;MAAEC,QAAQ,EAAE,MAAM;MAAEC,UAAU,EAAE,GAAG;MAAEC,KAAK,EAAE,MAAM;MAAEC,SAAS,EAAE,QAAQ;MAAEC,YAAY,EAAE;;KAAWX,KAAK,CAAS,EAC9HK;IAAQC,KAAK,EAAE;MAAEM,YAAY,EAAE,KAAK;MAAEC,MAAM,EAAE,mBAAmB;MAAEC,MAAM,EAAE,MAAM;MAAEC,KAAK,EAAE,MAAM;MAAEN,KAAK,EAAE,MAAM;MAAEF,QAAQ,EAAE,MAAM;MAAEC,UAAU,EAAE,GAAG;MAAEE,SAAS,EAAE,QAAQ;MAAEM,SAAS,EAAE;KAA+B;IAAEC,QAAQ,EAAEhB;KAC5NH,gBAAgB,aAAhBA,gBAAgB,uBAAhBA,gBAAgB,CAAEoB,GAAG,CAAC,UAACC,MAAM;IAAA,OAC5Bd;MAAQe,GAAG,EAAED,MAAM,CAACf,KAAK;MAAEA,KAAK,EAAEe,MAAM,CAACf;OACtCe,MAAM,CAACf,KAAK,CACN;GACV,CAAC,CACK,CACL;AAEV;;;;"}
{
"name": "magic-select",
"version": "1.0.9",
"version": "1.0.10",
"description": "Its not a simple select. Its your magic select component",

@@ -5,0 +5,0 @@ "author": "DGouron",