@trackunit/react-table 0.0.498 → 0.0.501
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.
- package/index.cjs.js +1 -1
- package/index.esm.js +1 -1
- package/package.json +1 -1
package/index.cjs.js
CHANGED
|
@@ -210,7 +210,7 @@ const actionDataToMenuItem = (action, dataTestId) => {
|
|
|
210
210
|
* @param {string} [dataTestId] - Optional data test ID.
|
|
211
211
|
* @returns {JSX.Element} - The ActionButton component for the given action.
|
|
212
212
|
*/
|
|
213
|
-
const actionDataToActionButton = (action, dataTestId) => (jsxRuntime.jsxs(ActionButton, { action: action, className: "max-w-max flex-shrink-0", dataTestId: action.
|
|
213
|
+
const actionDataToActionButton = (action, dataTestId) => (jsxRuntime.jsxs(ActionButton, { action: action, className: "max-w-max flex-shrink-0", dataTestId: action.dataTestId, disabled: action.loading, id: action.id, loading: action.loading, children: [action.loading ? (jsxRuntime.jsx(reactComponents.Spinner, { centering: "vertically", className: cvaActionSpinner({ variant: "primary" }), containerClassName: cvaActionSpinnerContainer(), size: "small" })) : (jsxRuntime.jsx(reactComponents.Icon, { color: "white", "data-testid": "action-icon", forwardedRef: action.forwardedRef, name: action.icon, size: action.size, style: action.style })), jsxRuntime.jsx(reactComponents.Text, { className: "!text-base text-white", dataTestId: `${dataTestId}-action-label`, children: action.label })] }, action.id));
|
|
214
214
|
|
|
215
215
|
/**
|
|
216
216
|
* `ActionContainerAndOverflow` renders a set of actions and a MoreMenu for overflow.
|
package/index.esm.js
CHANGED
|
@@ -191,7 +191,7 @@ const actionDataToMenuItem = (action, dataTestId) => {
|
|
|
191
191
|
* @param {string} [dataTestId] - Optional data test ID.
|
|
192
192
|
* @returns {JSX.Element} - The ActionButton component for the given action.
|
|
193
193
|
*/
|
|
194
|
-
const actionDataToActionButton = (action, dataTestId) => (jsxs(ActionButton, { action: action, className: "max-w-max flex-shrink-0", dataTestId: action.
|
|
194
|
+
const actionDataToActionButton = (action, dataTestId) => (jsxs(ActionButton, { action: action, className: "max-w-max flex-shrink-0", dataTestId: action.dataTestId, disabled: action.loading, id: action.id, loading: action.loading, children: [action.loading ? (jsx(Spinner, { centering: "vertically", className: cvaActionSpinner({ variant: "primary" }), containerClassName: cvaActionSpinnerContainer(), size: "small" })) : (jsx(Icon, { color: "white", "data-testid": "action-icon", forwardedRef: action.forwardedRef, name: action.icon, size: action.size, style: action.style })), jsx(Text, { className: "!text-base text-white", dataTestId: `${dataTestId}-action-label`, children: action.label })] }, action.id));
|
|
195
195
|
|
|
196
196
|
/**
|
|
197
197
|
* `ActionContainerAndOverflow` renders a set of actions and a MoreMenu for overflow.
|