Skip to content

Commit

Permalink
refactor(header): add control for inverted logo
Browse files Browse the repository at this point in the history
  • Loading branch information
tarantilis committed Jun 7, 2022
1 parent f2f0fd1 commit 023ca45
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
11 changes: 9 additions & 2 deletions src/ui/Header/Header.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,13 @@ export default {
type: { summary: 'boolean' },
},
},
inverted: {
description: 'Inverted logo',
table: {
defaultValue: { summary: '""' },
type: { summary: 'boolean' },
},
},
MainMenuVariation: {
control: { type: 'select' },
options: ['primary', 'secondary', 'tertiary', 'white'],
Expand All @@ -62,7 +69,6 @@ const logoProps = {
url: 'https://eea.europa.eu',
src: LogoImage,
invertedSrc: InvertedLogoImage,
inverted: false,
};

const links = [
Expand Down Expand Up @@ -384,7 +390,7 @@ const Template = (args) => {
transparency={args.transparency}
sticky={args.sticky}
pathname={pathname}
logo={<Logo {...logoProps} />}
logo={<Logo {...logoProps} inverted={args.inverted} />}
menuItems={menuItems}
renderMenuItem={(item, options = {}) => {
const { onClick } = options;
Expand Down Expand Up @@ -573,5 +579,6 @@ Default.args = {
menuItems,
transparency: false,
sticky: false,
inverted: false,
MainMenuVariation: 'primary',
};
1 change: 0 additions & 1 deletion src/ui/Logo/Logo.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ const Logo = ({ src, invertedSrc, id, url, alt, title, inverted }) => {
src={inverted ? invertedSrc : src}
alt={alt}
title={title}
//height={64}
className="eea-logo"
id={id}
/>
Expand Down

0 comments on commit 023ca45

Please sign in to comment.