Skip to content

Commit 5d94b55

Browse files
authored
Merge pull request #271 from kronostechnologies/dev/fix-app-menu
fix(ApplicationMenu): fix positioning of content
2 parents d8f8cce + 617dfeb commit 5d94b55

File tree

4 files changed

+34
-6
lines changed

4 files changed

+34
-6
lines changed

packages/react/src/components/application-menu/application-menu-content.tsx

+6
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,13 @@ const BurgerButton = styled.button`
1717
`;
1818

1919
const Container = styled.div`
20+
align-items: center;
2021
color: ${(props) => props.theme.greys.white};
22+
display: flex;
23+
24+
> * + * {
25+
margin-left: var(--spacing-1x);
26+
}
2127
`;
2228

2329
interface Props {

packages/react/src/components/application-menu/application-menu.test.tsx.snap

+12-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/react/src/components/application-menu/application-menu.tsx

+1-2
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ const Header = styled.header<{ device: DeviceType }>`
2424
display: flex;
2525
height: ${({ device }) => (device === 'desktop' ? 48 : 56)}px;
2626
justify-content: space-between;
27-
overflow: hidden;
2827
padding: ${({ device }) => getPadding(device)};
2928
position: relative;
3029
`;
@@ -50,7 +49,7 @@ const StyledSkipLink = styled(SkipLink)<ComponentProps<typeof SkipLink> & { isMo
5049
&:not(:focus) {
5150
clip: unset;
5251
height: auto;
53-
top: -50%;
52+
top: -100%;
5453
width: auto;
5554
}
5655

packages/storybook/stories/application-menu.stories.tsx

+15-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { ApplicationMenu } from '@equisoft/design-elements-react';
1+
import { ApplicationMenu, UserProfile } from '@equisoft/design-elements-react';
22
import { Story } from '@storybook/react';
33
import React, { ReactElement, VoidFunctionComponent } from 'react';
44
import CustomLogoSvg from './assets/customLogo.svg';
@@ -54,3 +54,17 @@ export const WithSkipLink: Story = () => (
5454
<p>Hello world</p>
5555
</ApplicationMenu>
5656
);
57+
58+
export const WithSkipLinkAndUserProfile: Story = () => (
59+
<ApplicationMenu skipLinkHref="#">
60+
<p>Hello world</p>
61+
<UserProfile
62+
username=""
63+
options={[{
64+
value: 'Something',
65+
href: '#',
66+
},
67+
]}
68+
/>
69+
</ApplicationMenu>
70+
);

0 commit comments

Comments
 (0)