-
-
Notifications
You must be signed in to change notification settings - Fork 118
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #866 from Meghana-12/dropdown
Dashboard Nav Dropdown
- Loading branch information
Showing
17 changed files
with
2,685 additions
and
3,768 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,13 @@ | ||
module.exports = { | ||
jest: { | ||
verbose: true, | ||
transform: { | ||
'^.+\\.js$': 'babel-jest', | ||
'^.+\\.(css|scss|less)$': 'jest-css-modules', | ||
}, | ||
transformIgnorePatterns: ['/node_modules/'], | ||
globals: { | ||
NODE_ENV: 'test', | ||
}, | ||
moduleFileExtensions: ['js', 'jsx'], | ||
moduleDirectories: ['src'], | ||
export const jest = { | ||
verbose: true, | ||
transform: { | ||
'^.+\\.js$': 'babel-jest', | ||
'^.+\\.(css|scss|less)$': 'jest-css-modules', | ||
}, | ||
transformIgnorePatterns: ['/node_modules/'], | ||
globals: { | ||
NODE_ENV: 'test', | ||
}, | ||
moduleFileExtensions: ['js', 'jsx'], | ||
moduleDirectories: ['src'], | ||
}; |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
35 changes: 35 additions & 0 deletions
35
...gnitus-Shared/ignitus-DesignSystem/ignitus-Atoms/ignitus-navDropdown/Components/index.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
import React from 'react'; | ||
import { Layer } from '../../../ignitus-Organisms/ignitus-SideNavigation/Common/styles'; | ||
import * as S from '../styles'; | ||
import { Props } from '../types'; | ||
import { AppIcon } from '../../../../types/iconsTypes/iconEnums'; | ||
|
||
export const DashboardNavigationDropdown = ({ Options, Name }: Props) => { | ||
const [content, setContent] = React.useState(false); | ||
return ( | ||
<S.Container> | ||
<S.NavigationHeading onClick={() => setContent(!content)}> | ||
<S.Icon name={AppIcon.StudentIcon} /> | ||
{Name} | ||
<S.Icon name={AppIcon.FilledArrowDownIcon} /> | ||
</S.NavigationHeading> | ||
{content && ( | ||
<S.Column> | ||
{Options.map(({ title }, x) => ( | ||
<div key={title}> | ||
<Layer | ||
border={Options.length - 1 !== x} | ||
style={{ height: '1rem' }} | ||
semiBold | ||
marginTop={false} | ||
marginBottom={false} | ||
> | ||
<S.Text> {title} </S.Text> | ||
</Layer> | ||
</div> | ||
))} | ||
</S.Column> | ||
)} | ||
</S.Container> | ||
); | ||
}; |
36 changes: 36 additions & 0 deletions
36
src/ignitus-Shared/ignitus-DesignSystem/ignitus-Atoms/ignitus-navDropdown/styles.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
import styled from '@emotion/styled/macro'; | ||
import { White, IgnitusBlue } from '../colors'; | ||
import { Icon as I } from '../../../ignitus-Utilities/Components/icon'; | ||
import { StyleProps } from './types'; | ||
import { MD } from '../fonts'; | ||
|
||
export const Container = styled.div` | ||
display: flex; | ||
flex-direction: column; | ||
width: 12rem; | ||
`; | ||
|
||
export const Column = styled.div` | ||
background-color: ${White}; | ||
border-radius: 1rem; | ||
margin-top: 1rem; | ||
`; | ||
|
||
export const NavigationHeading = styled.div` | ||
align-items: center; | ||
color: ${IgnitusBlue}; | ||
cursor: pointer; | ||
display: flex; | ||
font-size: ${MD}; | ||
justify-content: flex-end; | ||
`; | ||
|
||
export const Icon = styled(I)<StyleProps>` | ||
height: 2rem; | ||
fill: ${IgnitusBlue}; | ||
margin: 0 0.5rem; | ||
`; | ||
|
||
export const Text = styled.div` | ||
text-align: center; | ||
`; |
13 changes: 13 additions & 0 deletions
13
src/ignitus-Shared/ignitus-DesignSystem/ignitus-Atoms/ignitus-navDropdown/types.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
export type Props = { | ||
Options: Option[]; | ||
Name: string; | ||
}; | ||
|
||
type Option = { | ||
title: string; | ||
}; | ||
|
||
export type StyleProps = { | ||
marginLeft?: boolean; | ||
marginRight?: boolean; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 7 additions & 4 deletions
11
...tus-Shared/ignitus-DesignSystem/ignitus-Organisms/ignitus-SideNavigation/Common/styles.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 13 additions & 0 deletions
13
src/ignitus-UserInterfaceBook/Components/Atoms/interfaceNavDropdown/Components/index.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import React from 'react'; | ||
import { DashboardNavigationDropdown } from '../../../../../ignitus-Shared/ignitus-DesignSystem/ignitus-Atoms/ignitus-navDropdown/Components'; | ||
import { Options, Name } from '../constants'; | ||
import { Heading2 } from '../../../../../ignitus-Shared'; | ||
import { Interface } from '../../../../styles'; | ||
|
||
export const interfaceDashboardNavigationDropdown = () => ( | ||
<Interface> | ||
<Heading2>Dashboard DropDown</Heading2> | ||
<hr /> | ||
<DashboardNavigationDropdown Options={Options} Name={Name} /> | ||
</Interface> | ||
); |
17 changes: 17 additions & 0 deletions
17
src/ignitus-UserInterfaceBook/Components/Atoms/interfaceNavDropdown/constants.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
export const Options = [ | ||
{ | ||
title: 'Dashboard', | ||
}, | ||
{ | ||
title: 'Profile', | ||
}, | ||
{ | ||
title: 'Settings', | ||
}, | ||
{ title: 'Privacy Policy' }, | ||
{ | ||
title: 'Log out', | ||
}, | ||
]; | ||
|
||
export const Name = 'Sophia'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters