@talend/react-components
Version:
Set of react components.
46 lines • 1.25 kB
JavaScript
import PropTypes from 'prop-types';
import Action from '../../Actions/Action';
import Inject from '../../Inject';
import { getTheme } from '../../theme';
import headerBarCssModule from '../HeaderBar.module.scss';
import { jsx as _jsx } from "react/jsx-runtime";
const theme = getTheme(headerBarCssModule);
export function Logo({
isFull,
getComponent,
t,
...props
}) {
const icon = isFull ? 'talend-logo' : undefined;
const itemClassName = theme('tc-header-bar-action', 'separated');
const actionClassName = theme('tc-header-bar-logo', {
full: isFull
});
const Renderers = Inject.getAll(getComponent, {
Action
});
return /*#__PURE__*/_jsx("li", {
role: "presentation",
className: itemClassName,
children: /*#__PURE__*/_jsx(Renderers.Action, {
bsStyle: "link",
className: actionClassName,
hideLabel: true,
label: t('HEADERBAR_GO_PORTAL', {
defaultValue: 'Go to Portal'
}),
icon: icon,
tooltipPlacement: "bottom",
...props
})
});
}
Logo.propTypes = {
getComponent: PropTypes.func,
isFull: PropTypes.bool,
renderers: PropTypes.shape({
Action: PropTypes.func
}),
t: PropTypes.func.isRequired
};
//# sourceMappingURL=Logo.component.js.map