UNPKG

@grafana/ui

Version:
18 lines (15 loc) 610 B
import { jsx } from 'react/jsx-runtime'; import { css } from '@emotion/css'; import memoize from 'micro-memoize'; import { ActionButton } from '../../../Actions/ActionButton.mjs'; "use strict"; 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