UNPKG

design-react-kit

Version:

Componenti React per Bootstrap 5

16 lines 810 B
import React from 'react'; import classNames from 'classnames'; import { HeaderContext, CENTER, NAVBAR } from './HeaderContext'; export const Header = ({ className, small = false, theme = '', type, testId, ...attributes }) => { // use context here as theme const classes = classNames(className, { [`it-header-${type}-wrapper`]: type, 'it-small-header': type === CENTER && small, [`theme-${theme}`]: type !== NAVBAR && theme, 'theme-dark-mobile': type === NAVBAR && theme === 'dark', 'theme-light-desk': type === NAVBAR && theme === 'light' }); return (React.createElement(HeaderContext.Provider, { value: { type } }, React.createElement("div", { className: classes, ...attributes, "data-testid": testId }))); }; //# sourceMappingURL=Header.js.map