UNPKG

@frontify/fondue

Version:
35 lines (34 loc) 1.33 kB
import { jsx as t, jsxs as i } from "react/jsx-runtime"; import { forwardRef as a } from "react"; import l from "../../../../../foundation/Icon/Generated/IconCaretDown12.es.js"; import { merge as o } from "../../../../../utilities/merge.es.js"; const d = ({ label: w, open: e, onClick: n }, s) => /* @__PURE__ */ t( "button", { ref: s, "data-test-id": "textstyle-dropdown-trigger", type: "button", className: "tw-cursor-pointer tw-h-8 tw-w-full", onClick: (r) => { r.preventDefault(), r.stopPropagation(), n(); }, children: /* @__PURE__ */ i( "div", { className: o([ "tw-relative tw-inline-flex tw-flex-row tw-items-center tw-justify-between tw-overflow-hidden tw-text-text tw-rounded tw-gap-1 tw-px-2 hover:tw-text-box-selected-inverse hover:tw-bg-box-selected tw-h-6 tw-w-28", e && "tw-text-box-selected-inverse tw-bg-box-selected" ]), children: [ /* @__PURE__ */ t("span", { className: "tw-text-xs tw-truncate", children: w }), /* @__PURE__ */ t("div", { className: o(["tw-transition-transform", e && "tw-rotate-180"]), children: /* @__PURE__ */ t(l, {}) }) ] } ) } ), f = a(d); export { f as DropdownTrigger, d as DropdownTriggerComponent }; //# sourceMappingURL=DropdownTrigger.es.js.map