sccoreui
Version:
ui-sccore
18 lines (17 loc) • 937 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
const jsx_runtime_1 = require("react/jsx-runtime");
const dropdown_1 = require("primereact/dropdown");
const react_1 = require("react");
function CustomDropDown() {
const [selectedCity, setSelectedCity] = (0, react_1.useState)(null);
const cities = [
{ name: "New York", code: "NY" },
{ name: "Rome", code: "RM" },
{ name: "London", code: "LDN" },
{ name: "Istanbul", code: "IST" },
{ name: "Paris", code: "PRS" },
];
return ((0, jsx_runtime_1.jsx)("div", Object.assign({ className: "card flex justify-content-center" }, { children: (0, jsx_runtime_1.jsx)(dropdown_1.Dropdown, { value: selectedCity, onChange: (e) => setSelectedCity(e.value), options: cities, optionLabel: "name", placeholder: "Select a City", className: "w-full md:w-14rem" }) })));
}
exports.default = CustomDropDown;