UNPKG

carbon-react

Version:

A library of reusable React components for easily building user interfaces.

2 lines (1 loc) 2.06 kB
import{jsxs as e,jsx as r}from"react/jsx-runtime";import"react";import t from"styled-components";import{NavigationBar as n}from"../navigation-bar/navigation-bar.component.js";import{GlobalHeaderProvider as o}from"./__internal__/global-header.context.js";function i(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}const a=t.div.withConfig({displayName:"global-header.component__StyledLogo",componentId:"sc-b3ba41fe-0"})(["display:flex;align-items:center;margin-left:var(--spacing200);margin-right:var(--spacing300);& > *{max-height:100%;}@media (min-width:600px){margin-left:var(--spacing300);}@media (min-width:960px){margin-left:var(--spacing400);}@media (min-width:1260px){margin-left:var(--spacing500);}"]),l=t=>{var l,c,{children:p,logo:m}=t,b=function(e,r){if(null==e)return{};var t,n,o=function(e,r){if(null==e)return{};var t,n,o={},i=Object.keys(e);for(n=0;n<i.length;n++)t=i[n],r.indexOf(t)>=0||(o[t]=e[t]);return o}(e,r);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)t=i[n],r.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}(t,["children","logo"]);return e(n,(l=function(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{},n=Object.keys(t);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(t).filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})))),n.forEach((function(r){i(e,r,t[r])}))}return e}({isGlobal:!0},b),c=null!=(c={children:[m&&r(a,{"data-element":"global-header-logo-wrapper",children:m}),r(o,{children:p})]})?c:{},Object.getOwnPropertyDescriptors?Object.defineProperties(l,Object.getOwnPropertyDescriptors(c)):function(e){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);r.push.apply(r,t)}return r}(Object(c)).forEach((function(e){Object.defineProperty(l,e,Object.getOwnPropertyDescriptor(c,e))})),l))};l.displayName="GlobalHeader";export{l as default};