@talend/react-components
Version:
Set of react components.
42 lines • 1.11 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 Help({
getComponent,
t,
...props
}) {
const global = {
bsStyle: 'link',
icon: 'talend-question-circle',
label: t('HEADERBAR_HELP', {
defaultValue: 'Help'
}),
tooltipPlacement: 'bottom',
...props
};
const className = theme('tc-header-bar-action', 'tc-header-bar-help', 'separated');
const Renderers = Inject.getAll(getComponent, {
Action
});
return /*#__PURE__*/_jsx("li", {
role: "presentation",
className: className,
children: /*#__PURE__*/_jsx(Renderers.Action, {
...global
})
});
}
Help.propTypes = {
getComponent: PropTypes.func,
renderers: PropTypes.shape({
ActionSplitDropdown: PropTypes.func,
Action: PropTypes.func
}),
t: PropTypes.func.isRequired
};
//# sourceMappingURL=Help.component.js.map