@rimori/react-client 0.4.3 → 0.4.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -126,6 +126,6 @@ const ContextMenu = ({ client }) => {
|
|
|
126
126
|
} }, index))) }));
|
|
127
127
|
};
|
|
128
128
|
function MenuEntryItem(props) {
|
|
129
|
-
return (_jsxs("button", { onClick: props.onClick, className: "px-4 py-2 text-left hover:bg-gray-500 dark:hover:bg-gray-600 w-full flex flex-row", children: [_jsx("span", { className: "flex-grow", children:
|
|
129
|
+
return (_jsxs("button", { onClick: props.onClick, className: "px-2 md:px-4 py-2 text-left hover:bg-gray-500 dark:hover:bg-gray-600 w-full flex flex-row", children: [props.iconUrl && (_jsx("span", { className: "flex-grow", children: _jsx("img", { src: props.iconUrl, alt: props.text, className: "w-4 h-4 mr-2" }) })), _jsx("span", { className: "flex-grow", children: props.text })] }));
|
|
130
130
|
}
|
|
131
131
|
export default ContextMenu;
|
package/package.json
CHANGED
|
@@ -161,11 +161,13 @@ function MenuEntryItem(props: { iconUrl?: string; text: string; onClick: () => v
|
|
|
161
161
|
return (
|
|
162
162
|
<button
|
|
163
163
|
onClick={props.onClick}
|
|
164
|
-
className="px-4 py-2 text-left hover:bg-gray-500 dark:hover:bg-gray-600 w-full flex flex-row"
|
|
164
|
+
className="px-2 md:px-4 py-2 text-left hover:bg-gray-500 dark:hover:bg-gray-600 w-full flex flex-row"
|
|
165
165
|
>
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
166
|
+
{props.iconUrl && (
|
|
167
|
+
<span className="flex-grow">
|
|
168
|
+
<img src={props.iconUrl} alt={props.text} className="w-4 h-4 mr-2" />
|
|
169
|
+
</span>
|
|
170
|
+
)}
|
|
169
171
|
<span className="flex-grow">{props.text}</span>
|
|
170
172
|
{/* <span className="text-sm">Ctrl+Shift+xxxx</span> */}
|
|
171
173
|
</button>
|