diff --git a/.changeset/olive-zebras-dress.md b/.changeset/olive-zebras-dress.md new file mode 100644 index 0000000000..a28a3b5ff9 --- /dev/null +++ b/.changeset/olive-zebras-dress.md @@ -0,0 +1,5 @@ +--- +'@swisspost/internet-header': minor +--- + +Enabled nesting the header in a different scroll container than the `` element. The header stickyness and logo animation logic will automatically attach to the nearest scrolling container instead of the document when nested in a container that has `overflow: auto | scroll` set. diff --git a/.changeset/quick-feet-wink.md b/.changeset/quick-feet-wink.md new file mode 100644 index 0000000000..1e830856bc --- /dev/null +++ b/.changeset/quick-feet-wink.md @@ -0,0 +1,5 @@ +--- +'@swisspost/internet-header': patch +--- + +Fixed an issue with custom configuration that was not applied when the prop "language" was not set on the internet header. diff --git a/packages/documentation/.storybook/blocks/layout.tsx b/packages/documentation/.storybook/blocks/layout.tsx index 93f792d094..7f3813c8b3 100644 --- a/packages/documentation/.storybook/blocks/layout.tsx +++ b/packages/documentation/.storybook/blocks/layout.tsx @@ -1,5 +1,5 @@ import { DocsContainer, DocsContainerProps, Unstyled } from '@storybook/blocks'; -import React, { PropsWithChildren } from 'react'; +import { PropsWithChildren } from 'react'; import '../styles/layout.scss'; import Footer from './footer'; import Header from './header'; @@ -12,13 +12,18 @@ function shouldShowFooter() { return window.location !== window.parent.location; } -export default ({ children, context }: PropsWithChildren) => { +export default (props: PropsWithChildren) => { + const { children, context } = props; + const container = + context.channel.data.docsPrepared[0].parameters.layout === 'fullscreen' + ? 'container-fluid' + : 'container'; return ( - {shouldShowHeader() &&
} -
{children}
- {shouldShowFooter() &&