UNPKG

@difizen/ai-flow

Version:

Scalable, out-of-the-box, agent-oriented flow

35 lines 1.2 kB
import React from 'react'; import { memo } from 'react'; import { jsx as _jsx } from "react/jsx-runtime"; import { jsxs as _jsxs } from "react/jsx-runtime"; export var PromptMenuItem = /*#__PURE__*/memo(function (_ref) { var icon = _ref.icon, title = _ref.title, disabled = _ref.disabled, isSelected = _ref.isSelected, _onClick = _ref.onClick, _onMouseEnter = _ref.onMouseEnter, setRefElement = _ref.setRefElement; return /*#__PURE__*/_jsxs("div", { className: "\n flex items-center px-3 h-6 cursor-pointer hover:bg-gray-50 rounded-md\n ".concat(isSelected && !disabled && '!bg-gray-50', "\n ").concat(disabled ? 'cursor-not-allowed opacity-30' : 'hover:bg-gray-50 cursor-pointer', "\n "), tabIndex: -1, ref: setRefElement, onMouseEnter: function onMouseEnter() { if (disabled) { return; } _onMouseEnter(); }, onClick: function onClick() { if (disabled) { return; } _onClick(); }, children: [icon, /*#__PURE__*/_jsx("div", { className: "ml-1 text-[13px] text-gray-900", children: title })] }); }); PromptMenuItem.displayName = 'PromptMenuItem';