@talend/react-components
Version:
Set of react components.
36 lines • 1 kB
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 CallToAction({
getComponent,
...props
}) {
const actionProps = {
bsStyle: 'info',
className: 'btn-inverse',
tooltipPlacement: 'bottom',
...props
};
const className = theme('tc-header-bar-action', 'tc-header-bar-call-to-action', 'separated');
const Renderers = Inject.getAll(getComponent, {
Action
});
return /*#__PURE__*/_jsx("li", {
role: "presentation",
className: className,
children: /*#__PURE__*/_jsx(Renderers.Action, {
...actionProps
})
});
}
CallToAction.propTypes = {
getComponent: PropTypes.func,
renders: PropTypes.shape({
Action: PropTypes.func
})
};
//# sourceMappingURL=CallToAction.component.js.map