Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(Notification): initial Implementation #171

Merged
merged 7 commits into from
Nov 7, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
142 changes: 142 additions & 0 deletions packages/main/src/components/Notification/Notification.jss.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,142 @@
import { JSSTheme } from '../../interfaces/JSSTheme';

const style = ({ parameters }: JSSTheme) => ({
notificationContainer: {
width: '100%',
maxWidth: '60rem',
backgroundColor: parameters.sapUiListBackground,
boxShadow: parameters.sapUiShadowLevel0,
display: 'flex',
flexDirection: 'row',
position: 'relative',
overflow: 'hidden',
'&:hover': {
backgroundColor: parameters.sapUiListHoverBackground
},
'&:active': {
backgroundColor: parameters.sapUiListHoverBackground
}
},
notificationContainerChild: {
backgroundColor: parameters.sapUiListHeaderBackground
},
header: {
display: 'flex',
flexDirection: 'row',
boxShadow: `inset 0 -0.0625rem ${parameters.sapUiPageHeaderBorderColor}`,
padding: '1rem 0 1rem 1.25rem',
alignItems: 'center'
},
titleEllipsised: {
overflow: 'hidden',
textOverflow: 'ellipsis',
display: '-webkit-box',
Lukas742 marked this conversation as resolved.
Show resolved Hide resolved
lineHeight: '15px',
maxHeight: '30px' /* height * number of lines */,
WebkitLineClamp: 2 /* number of lines to show */,
Lukas742 marked this conversation as resolved.
Show resolved Hide resolved
WebkitBoxOrient: 'vertical',
paddingRight: '40px'
},
title: {
color: parameters.sapUiGroupTitleTextColor,
fontFamily: parameters.sapUiFontHeaderFamily,
textShadow: parameters.sapUiShadowText,
fontSize: '14px',
paddingRight: '40px'
},
closeButton: {
position: 'absolute',
right: '0.5rem',
top: '0.5rem'
},
content: {
boxSizing: 'border-box',
display: 'flex',
flexDirection: 'row',
'@media (min-width: 600px)': {
maxWidth: '60%',
paddingRight: '1rem'
},
'@media (max-width: 599px)': {
width: '100%'
}
},
descriptionContainer: {
display: 'flex',
flexDirection: 'column'
},
avatar: {
paddingRight: '0.375rem'
},
descriptionEllipsised: {
color: parameters.sapUiContentLabelColor,
overflow: 'hidden',
textAlign: 'left',
textOverflow: 'ellipsis',
display: '-webkit-box',
Lukas742 marked this conversation as resolved.
Show resolved Hide resolved
lineHeight: '15px',
maxHeight: '30px' /* height * number of lines */,
WebkitLineClamp: '2' /* number of lines to show */,
WebkitBoxOrient: 'vertical'
},
descriptionFull: {
color: parameters.sapUiContentLabelColor
},
metadata: {
paddingTop: '0.375rem',
fontFamily: parameters.sapUiFontFamily,
fontSize: parameters.sapMFontMediumSize,
color: parameters.sapUiContentLabelColor,
fontWeight: 'normal',
display: 'flex',
flexWrap: 'wrap',
overflow: 'hidden'
},
separator: {
margin: '0 0.5rem 0 0.5rem'
},
priorityIndicator: {
width: '0.375rem',
minWidth: '0.375rem',
height: 'auto'
},
high: { backgroundColor: parameters.sapUiErrorBorder },
medium: { backgroundColor: parameters.sapUiWarningBorder },
low: { backgroundColor: parameters.sapUiSuccessBorder },
none: { backgroundColor: parameters.sapUiNeutralBorder },
semanticIcon: {
paddingRight: '0.375rem'
},
error: {
color: parameters.sapUiNegativeElement
},
warning: {
color: parameters.sapUiCriticalElement
},
success: {
color: parameters.sapUiPositiveElement
},
contentAction: {
display: 'flex',
flexDirection: 'row',
flexWrap: 'wrap',
'@media (min-width: 600px)': {
justifyContent: 'space-between'
},
justifyContent: 'flex-end'
},
footer: {
'@media (min-width: 600px)': {
maxWidth: '40%',
alignSelf: 'flex-end'
},
maxWidth: '100%',
padding: '0 0.5rem 0.5rem 0'
},
showGroup: {
paddingLeft: '1rem',
alignSelf: 'flex-start'
}
});

export default style;
82 changes: 82 additions & 0 deletions packages/main/src/components/Notification/Notification.test.tsx

Large diffs are not rendered by default.

Loading