Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
tiberiuichim committed Mar 3, 2022
1 parent 15bc0f4 commit a8d97f1
Show file tree
Hide file tree
Showing 3 changed files with 695 additions and 707 deletions.
8 changes: 2 additions & 6 deletions src/ui/Header/Header.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,22 +38,18 @@ const TopDropdownMenu = ({
mobileText,
icon,
}) => {
// TODO: in original implementation "wrapper" class was also available with
// "content" class
const Component = ({ mobileText }) => (
<Dropdown
id={id}
className={cx(className, {
'mobile or lower hidden': !mobileText,
'mobile only': !!mobileText,
})} // !!mobileText
})}
text={text}
icon={icon || 'chevron down'}
aria-label="dropdown"
>
<Dropdown.Menu role="group">
<div className="wrapper content">{children}</div>
</Dropdown.Menu>
<Dropdown.Menu role="group">{children}</Dropdown.Menu>
</Dropdown>
);
return (
Expand Down
27 changes: 14 additions & 13 deletions src/ui/Header/Header.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,6 @@ const Template = (args) => {
<Header.TopHeader>
<Header.TopItem className="official-union">
<Image src={eeaFlag} alt="eea flag"></Image>

<Header.TopDropdownMenu
text="An official website of the European Union | How do you Know?"
mobileText="An official EU website"
Expand Down Expand Up @@ -290,18 +289,20 @@ const Template = (args) => {
className="tablet or lower hidden"
text={linksMenuTitle}
>
{links.map((item, index) => (
<Dropdown.Item key={index}>
<a
href={item.href}
className="site"
target="_blank"
rel="noreferrer"
>
{item.title}
</a>
</Dropdown.Item>
))}
<div className="wrapper">
{links.map((item, index) => (
<Dropdown.Item key={index}>
<a
href={item.href}
className="site"
target="_blank"
rel="noreferrer"
>
{item.title}
</a>
</Dropdown.Item>
))}
</div>
</Header.TopDropdownMenu>
</Header.TopItem>

Expand Down

0 comments on commit a8d97f1

Please sign in to comment.