@talend/react-components
Version:
Set of react components.
35 lines • 968 B
JavaScript
import PropTypes from 'prop-types';
import Inject from '../../Inject';
import Action from '../../Actions/Action';
import { getTheme } from '../../theme';
import headerBarCssModule from '../HeaderBar.module.scss';
import { jsx as _jsx } from "react/jsx-runtime";
const theme = getTheme(headerBarCssModule);
export function GenericAction({
getComponent,
...props
}) {
const global = {
bsStyle: 'link',
tooltipPlacement: 'bottom',
...props
};
const className = theme('tc-header-bar-action', 'tc-header-bar-generic-action', 'separated');
const Renderers = Inject.getAll(getComponent, {
Action
});
return /*#__PURE__*/_jsx("li", {
role: "presentation",
className: className,
children: /*#__PURE__*/_jsx(Renderers.Action, {
...global
})
});
}
GenericAction.propTypes = {
getComponent: PropTypes.func,
renders: PropTypes.shape({
Action: PropTypes.func
})
};
//# sourceMappingURL=GenericAction.component.js.map