Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(Header): bleed not working in o2-new skin #1137

Merged
merged 4 commits into from
Jun 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
58 changes: 37 additions & 21 deletions src/__private_stories__/skin-components-story.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,10 @@ import {
Hero,
Table,
Timer,
HeaderLayout,
Header,
Placeholder,
NegativeBox,
} from '..';
import {InternalIconButton} from '../icon-button';
import avatarImg from '../__stories__/images/avatar.jpg';
Expand All @@ -68,29 +72,41 @@ type Args = {
};

export const Default: StoryComponent<Args> = ({variant}) => {
// Only show inverse header when the rest of the screen is default
const inverseHeader = variant === 'default';
return (
<ResponsiveLayout fullWidth variant={variant}>
<Box padding={16}>
<ResponsiveLayout variant={variant}>
<Box paddingTop={inverseHeader ? 0 : {mobile: 32, desktop: 48}} paddingBottom={16}>
<Stack space={32}>
<Text2 regular>
This story is created to verify how some of the components look like when using
different skins
</Text2>

<RowList>
<Row
title="Title 1"
subtitle="Subtitle"
description="Description"
href="https://www.google.com/"
/>
<Row
title="Title 2"
subtitle="Subtitle"
description="Description"
href="https://www.google.com/"
/>
</RowList>
<HeaderLayout
isInverse={inverseHeader}
bleed
header={
<Header
title="Components in different skins"
description="This story is created to verify how some of the components look like when using
different skins"
/>
}
extra={<Placeholder />}
noPaddingY={!inverseHeader}
/>
<NegativeBox>
<RowList>
<Row
title="Title 1"
subtitle="Subtitle"
description="Description"
href="https://www.google.com/"
/>
<Row
title="Title 2"
subtitle="Subtitle"
description="Description"
href="https://www.google.com/"
/>
</RowList>
</NegativeBox>
{/** BoxedAccordion */}
<BoxedAccordion index={1}>
<BoxedAccordionItem
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion src/header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ export const HeaderLayout: React.FC<HeaderLayoutProps> = ({
{isBleedActivated && (
<ResponsiveLayout
className={sideBySideExtraOnDesktop ? styles.hideOnDesktop : ''}
backgroundColor={`linear-gradient(to bottom, ${vars.colors.backgroundBrand} 40px, ${vars.colors.background} 0%)`}
backgroundColor={`linear-gradient(to bottom, ${vars.colors.backgroundBrandBottom} 40px, ${vars.colors.background} 0%)`}
>
{extra}
</ResponsiveLayout>
Expand Down
2 changes: 1 addition & 1 deletion src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ export {palette as blauPalette} from './skins/blau';
export {palette as tuPalette} from './skins/tu';

export type {Locale} from './utils/locale';
export type {TrackingEvent, IconProps} from './utils/types';
export type {TrackingEvent, IconProps, DataAttributes} from './utils/types';
export type {RegionCode} from './utils/region-code';

/*
Expand Down
Loading