-
-
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 #898 from Dishebh/notification
Added Notifications component under Organisms route
- Loading branch information
Showing
8 changed files
with
183 additions
and
0 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
35 changes: 35 additions & 0 deletions
35
...-Shared/ignitus-DesignSystem/ignitus-Organisms/ignitus-Notifications/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 @@ | ||
/* eslint-disable import/extensions */ | ||
/* eslint-disable jsx-a11y/accessible-emoji */ | ||
import React from 'react'; | ||
import * as S from '../styles'; | ||
import { withErrorBoundary } from '../../../../ignitus-ErrorHandlingComponents/errorBoundary'; | ||
import { AppIcon } from '../../../../types/iconsTypes/iconEnums'; | ||
import * as C from '../../../ignitus-Atoms/colors'; | ||
import { InputTypes } from '../types'; | ||
|
||
export const Notifications = withErrorBoundary( | ||
({ | ||
textColor, | ||
titleColor, | ||
bgColor, | ||
picture, | ||
title, | ||
textLeft, | ||
textRight, | ||
...rest | ||
}: InputTypes) => ( | ||
<S.Container color={textColor} bgColor={bgColor} {...rest}> | ||
<S.LeftContainer> | ||
{picture && <S.Image src={picture} />} | ||
{textLeft} | ||
<S.Text color={titleColor}> {title} </S.Text> | ||
{textRight} | ||
</S.LeftContainer> | ||
<S.RightContainer> | ||
<S.IconContainer> | ||
<S.Icon color={C.GreyOne} name={AppIcon.CrossIcon} /> | ||
</S.IconContainer> | ||
</S.RightContainer> | ||
</S.Container> | ||
), | ||
); |
47 changes: 47 additions & 0 deletions
47
src/ignitus-Shared/ignitus-DesignSystem/ignitus-Organisms/ignitus-Notifications/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,47 @@ | ||
import styled from '@emotion/styled'; | ||
import { Icon as I } from '../../../ignitus-Utilities/Components/icon'; | ||
import { StyledTagProps } from './types'; | ||
import { Paragraph } from '../../..'; | ||
import { Bold } from '../../ignitus-Atoms/fonts'; | ||
|
||
export const Container = styled.span<StyledTagProps>` | ||
background: ${props => props.bgColor}; | ||
color: ${props => props.color}; | ||
border-radius: 0.5rem; | ||
margin: 0.5rem; | ||
cursor: pointer; | ||
display: flex; | ||
flex-direction: row; | ||
justify-content: space-between; | ||
align-items: center; | ||
box-shadow: 0px 3px 6px rgba(0, 0, 0, 0.1); | ||
`; | ||
|
||
export const IconContainer = styled.div` | ||
display: flex; | ||
`; | ||
|
||
export const Icon = styled(I)` | ||
width: 1.5rem; | ||
fill: ${props => props.color}; | ||
transition: 0.3s; | ||
`; | ||
|
||
export const Image = styled.img` | ||
height: 3rem; | ||
border-radius: 50%; | ||
margin-right: 1rem; | ||
`; | ||
|
||
export const Text = styled(Paragraph)` | ||
font-weight: ${Bold}; | ||
color: ${props => props.color}; | ||
`; | ||
|
||
export const LeftContainer = styled.div` | ||
display: flex; | ||
flex-direction: row; | ||
align-items: center; | ||
`; | ||
|
||
export const RightContainer = styled.div``; |
14 changes: 14 additions & 0 deletions
14
src/ignitus-Shared/ignitus-DesignSystem/ignitus-Organisms/ignitus-Notifications/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,14 @@ | ||
export type InputTypes = { | ||
textColor: string; | ||
titleColor: string; | ||
bgColor: string; | ||
picture?: string; | ||
title?: string; | ||
textLeft?: string; | ||
textRight?: string; | ||
}; | ||
|
||
export type StyledTagProps = { | ||
bgColor: string; | ||
color: string; | ||
}; |
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
68 changes: 68 additions & 0 deletions
68
...gnitus-UserInterfaceBook/Components/Organisms/interfaceNotifications/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,68 @@ | ||
import React from 'react'; | ||
|
||
import { Heading2, Heading4 } from '../../../../../ignitus-Shared'; | ||
import * as C from '../../../../../ignitus-Shared/ignitus-DesignSystem/ignitus-Atoms/colors'; | ||
import { Interface } from '../../../../styles'; | ||
import * as S from '../style'; | ||
|
||
export const InterfaceNotifications: React.FC = () => ( | ||
<Interface> | ||
<Heading2>Notifications</Heading2> | ||
<hr /> | ||
<Heading4>Today</Heading4> | ||
<S.StyledNotifications | ||
textColor={C.Black} | ||
titleColor={C.IgnitusBlue} | ||
bgColor={C.White} | ||
picture="https://storage.googleapis.com/ignitus_assets/ig-avatars/eugene.png" | ||
title="Davis Johnson" | ||
textRight="is tracking your progress" | ||
/> | ||
<S.StyledNotifications | ||
textColor={C.Black} | ||
titleColor={C.Orange} | ||
bgColor={C.White} | ||
title="3 mentors" | ||
textLeft="We found" | ||
textRight="that could help you with your journey" | ||
/> | ||
<S.StyledNotifications | ||
textColor={C.Black} | ||
titleColor={C.IgnitusBlue} | ||
bgColor={C.White} | ||
picture="https://storage.googleapis.com/ignitus_assets/ig-avatars/eugene.png" | ||
title="Donald Kunkel" | ||
textRight="wants to connect with you" | ||
/> | ||
<S.StyledNotifications | ||
textColor={C.Black} | ||
titleColor={C.Orange} | ||
bgColor={C.White} | ||
title="3 offers" | ||
textLeft="We found" | ||
textRight="that could interest you" | ||
/> | ||
|
||
<br /> | ||
<br /> | ||
<br /> | ||
|
||
<Heading4>Yesterday</Heading4> | ||
<S.StyledNotifications | ||
textColor={C.Black} | ||
titleColor={C.IgnitusBlue} | ||
background={C.White} | ||
image="https://storage.googleapis.com/ignitus_assets/ig-avatars/eugene.png" | ||
title="Donald Kunkel" | ||
textRight="wants to connect with you" | ||
/> | ||
<S.StyledNotifications | ||
textColor={C.Black} | ||
titleColor={C.Orange} | ||
background={C.White} | ||
title="3 mentors" | ||
textLeft="We found" | ||
textRight="that could help you with your journey" | ||
/> | ||
</Interface> | ||
); |
7 changes: 7 additions & 0 deletions
7
src/ignitus-UserInterfaceBook/Components/Organisms/interfaceNotifications/style.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,7 @@ | ||
import styled from '@emotion/styled'; | ||
import { Notifications } from '../../../../ignitus-Shared/ignitus-DesignSystem/ignitus-Organisms/ignitus-Notifications/Components'; | ||
|
||
export const StyledNotifications = styled(Notifications)` | ||
padding: 1rem; | ||
height: 2rem; | ||
`; |
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