@react95/core
Version:
Windows 95 styleguide
28 lines (27 loc) • 1.04 kB
JavaScript
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
const React = require("react");
const cn = require("classnames");
const Dropdown_css = require("./Dropdown.css.cjs");
const Frame = require("../Frame/Frame.cjs");
const Frame_css = require("../Frame/Frame.css.cjs");
const defaultOptions = [
"",
"C:\\Documents and Settings",
"C:\\Documents and Settings\\Documents",
"iexplorer.exe"
];
const Dropdown = React.forwardRef(
({ options = defaultOptions, ...rest }, ref) => {
const { style, otherProps, className } = Frame_css.sprinkles(rest);
return /* @__PURE__ */ React.createElement(
Frame.Frame,
{
style,
className: cn(Dropdown_css.wrapper, className, otherProps.className)
},
/* @__PURE__ */ React.createElement("select", { ...otherProps, className: cn(Dropdown_css.select), ref }, options && options.map((option) => /* @__PURE__ */ React.createElement("option", { key: option, value: option }, option)))
);
}
);
exports.Dropdown = Dropdown;
;