UNPKG

geoiq-frontend-ui-kit

Version:

This project is a UI kit for GeoIQ's frontend. It's built with React, TypeScript, and Vite.

28 lines (27 loc) 1.19 kB
import t from "react"; import { SWATCHES as l } from "./index150.es.js"; function m({ value: r, onChange: a }) { return /* @__PURE__ */ t.createElement("div", null, /* @__PURE__ */ t.createElement("span", { className: "mb-1 block text-xs text-light-4" }, "Color"), /* @__PURE__ */ t.createElement("div", { className: "flex items-center gap-2" }, /* @__PURE__ */ t.createElement( "input", { type: "color", value: r, onChange: (e) => a(e.target.value), className: "h-[34px] w-10 cursor-pointer rounded-md border border-neutral-1 bg-white p-0.5" } ), /* @__PURE__ */ t.createElement("span", { className: "text-xs text-light-4" }, r)), /* @__PURE__ */ t.createElement("div", { className: "mt-2 flex flex-wrap gap-1.5" }, l.map((e) => /* @__PURE__ */ t.createElement( "button", { key: e, type: "button", "aria-label": e, onClick: () => a(e), className: `h-[26px] w-[26px] rounded-md border-2 hover:border-light-2 ${r.toLowerCase() === e.toLowerCase() ? "border-rest-p1" : "border-transparent"}`, style: { backgroundColor: e } } )))); } export { m as ColorPicker }; //# sourceMappingURL=index180.es.js.map