UNPKG

@frontify/fondue

Version:
20 lines (19 loc) 764 B
import { jsx as t } from "react/jsx-runtime"; import { TinyColor as e } from "@ctrl/tinycolor"; import { toShortRgb as w } from "../../utilities/colors.es.js"; const l = ({ color: o }) => { const r = new e(w(o)).toRgbString(); return /* @__PURE__ */ t("div", { className: "tw-sticky tw-ml-[-1px] tw-mt-[-1px] tw-border tw-border-transparent tw-w-full tw-box-content tw-shrink-0 tw-h-2 tw-top-0 tw-rounded-t tw-overflow-hidden", children: /* @__PURE__ */ t( "div", { className: "tw-h-full tw-w-full tw-bg-white tw-z-20 dark:tw-bg-black-95", style: { backgroundColor: r }, "data-test-id": "color-preview" } ) }); }; l.displayName = "FondueColorPreview"; export { l as ColorPreview }; //# sourceMappingURL=ColorPreview.es.js.map