@grafana/ui
Version:
Grafana Components Library
18 lines (15 loc) • 610 B
JavaScript
import { jsx } from 'react/jsx-runtime';
import { css } from '@emotion/css';
import memoize from 'micro-memoize';
import { ActionButton } from '../../../Actions/ActionButton.mjs';
;
const ActionsCell = ({ field, rowIdx, getActions }) => {
const actions = getActions(field, rowIdx);
if (actions.length === 0) {
return null;
}
return actions.map((action, i) => /* @__PURE__ */ jsx(ActionButton, { action, variant: "secondary" }, i));
};
const getStyles = memoize((theme) => css({ gap: theme.spacing(0.75) }));
export { ActionsCell, getStyles };
//# sourceMappingURL=ActionsCell.mjs.map