Skip to content

Commit

Permalink
Merge pull request #271 from kronostechnologies/dev/fix-app-menu
Browse files Browse the repository at this point in the history
fix(ApplicationMenu): fix positioning of content
  • Loading branch information
meriouma authored Jul 20, 2021
2 parents d8f8cce + 617dfeb commit 5d94b55
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,13 @@ const BurgerButton = styled.button`
`;

const Container = styled.div`
align-items: center;
color: ${(props) => props.theme.greys.white};
display: flex;
> * + * {
margin-left: var(--spacing-1x);
}
`;

interface Props {
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ const Header = styled.header<{ device: DeviceType }>`
display: flex;
height: ${({ device }) => (device === 'desktop' ? 48 : 56)}px;
justify-content: space-between;
overflow: hidden;
padding: ${({ device }) => getPadding(device)};
position: relative;
`;
Expand All @@ -50,7 +49,7 @@ const StyledSkipLink = styled(SkipLink)<ComponentProps<typeof SkipLink> & { isMo
&:not(:focus) {
clip: unset;
height: auto;
top: -50%;
top: -100%;
width: auto;
}
Expand Down
16 changes: 15 additions & 1 deletion packages/storybook/stories/application-menu.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ApplicationMenu } from '@equisoft/design-elements-react';
import { ApplicationMenu, UserProfile } from '@equisoft/design-elements-react';
import { Story } from '@storybook/react';
import React, { ReactElement, VoidFunctionComponent } from 'react';
import CustomLogoSvg from './assets/customLogo.svg';
Expand Down Expand Up @@ -54,3 +54,17 @@ export const WithSkipLink: Story = () => (
<p>Hello world</p>
</ApplicationMenu>
);

export const WithSkipLinkAndUserProfile: Story = () => (
<ApplicationMenu skipLinkHref="#">
<p>Hello world</p>
<UserProfile
username=""
options={[{
value: 'Something',
href: '#',
},
]}
/>
</ApplicationMenu>
);

0 comments on commit 5d94b55

Please sign in to comment.