UNPKG

design-react-kit

Version:

Componenti React per Bootstrap 5

18 lines 1 kB
import React from 'react'; import classNames from 'classnames'; import { Col, Container, Navbar, Row } from 'reactstrap'; import { SLIM, CENTER, NAVBAR, useHeaderContext } from './HeaderContext'; export const HeaderContent = ({ className, megamenu, testId, ...attributes }) => { const type = useHeaderContext(); const classes = classNames(className, { 'it-header-slim-wrapper-content': type === SLIM, 'it-header-center-content-wrapper': type === CENTER, navbar: type === NAVBAR, 'has-megamenu': megamenu }); const Content = type === NAVBAR ? (React.createElement(Navbar, { className: classes, ...attributes, "data-testid": testId })) : (React.createElement("div", { className: classes, ...attributes, "data-testid": testId })); return (React.createElement(Container, { className: 'container-xxl', fluid: true }, React.createElement(Row, null, React.createElement(Col, null, Content)))); }; //# sourceMappingURL=HeaderContent.js.map