fix: set notification card design up to spec
This commit is contained in:
parent
af8eaad61a
commit
dc4a8471d4
3 changed files with 34 additions and 12 deletions
|
|
@ -64,6 +64,9 @@ const styles = {
|
||||||
position: 'relative',
|
position: 'relative',
|
||||||
marginBottom: spacer / 2,
|
marginBottom: spacer / 2,
|
||||||
paddingTop: spacer * 1.5,
|
paddingTop: spacer * 1.5,
|
||||||
|
'& > *:first-child': {
|
||||||
|
marginRight: 24
|
||||||
|
},
|
||||||
'& > *': {
|
'& > *': {
|
||||||
marginRight: 10
|
marginRight: 10
|
||||||
},
|
},
|
||||||
|
|
@ -74,7 +77,8 @@ const styles = {
|
||||||
notificationContent: {
|
notificationContent: {
|
||||||
display: 'flex',
|
display: 'flex',
|
||||||
flexDirection: 'column',
|
flexDirection: 'column',
|
||||||
justifyContent: 'center'
|
justifyContent: 'center',
|
||||||
|
width: 300
|
||||||
},
|
},
|
||||||
unread: {
|
unread: {
|
||||||
backgroundColor: spring3
|
backgroundColor: spring3
|
||||||
|
|
@ -89,8 +93,7 @@ const styles = {
|
||||||
flexGrow: 1
|
flexGrow: 1
|
||||||
},
|
},
|
||||||
unreadIcon: {
|
unreadIcon: {
|
||||||
marginLeft: spacer,
|
marginTop: 2,
|
||||||
marginTop: 5,
|
|
||||||
width: '12px',
|
width: '12px',
|
||||||
height: '12px',
|
height: '12px',
|
||||||
backgroundColor: secondaryColor,
|
backgroundColor: secondaryColor,
|
||||||
|
|
|
||||||
|
|
@ -13,12 +13,27 @@ import styles from './NotificationCenter.styles'
|
||||||
const useStyles = makeStyles(styles)
|
const useStyles = makeStyles(styles)
|
||||||
|
|
||||||
const types = {
|
const types = {
|
||||||
transaction: { display: 'Transactions', icon: <Transaction /> },
|
transaction: {
|
||||||
highValueTransaction: { display: 'Transactions', icon: <Transaction /> },
|
display: 'Transactions',
|
||||||
fiatBalance: { display: 'Maintenance', icon: <Wrench /> },
|
icon: <Transaction height={16} width={16} />
|
||||||
cryptoBalance: { display: 'Maintenance', icon: <Wrench /> },
|
},
|
||||||
compliance: { display: 'Compliance', icon: <WarningIcon /> },
|
highValueTransaction: {
|
||||||
error: { display: 'Error', icon: <WarningIcon /> }
|
display: 'Transactions',
|
||||||
|
icon: <Transaction height={16} width={16} />
|
||||||
|
},
|
||||||
|
fiatBalance: {
|
||||||
|
display: 'Maintenance',
|
||||||
|
icon: <Wrench height={16} width={16} />
|
||||||
|
},
|
||||||
|
cryptoBalance: {
|
||||||
|
display: 'Maintenance',
|
||||||
|
icon: <Wrench height={16} width={16} />
|
||||||
|
},
|
||||||
|
compliance: {
|
||||||
|
display: 'Compliance',
|
||||||
|
icon: <WarningIcon height={16} width={16} />
|
||||||
|
},
|
||||||
|
error: { display: 'Error', icon: <WarningIcon height={16} width={16} /> }
|
||||||
}
|
}
|
||||||
|
|
||||||
const NotificationRow = ({
|
const NotificationRow = ({
|
||||||
|
|
@ -35,7 +50,9 @@ const NotificationRow = ({
|
||||||
const classes = useStyles()
|
const classes = useStyles()
|
||||||
|
|
||||||
const typeDisplay = R.path([type, 'display'])(types) ?? null
|
const typeDisplay = R.path([type, 'display'])(types) ?? null
|
||||||
const icon = R.path([type, 'icon'])(types) ?? <Wrench />
|
const icon = R.path([type, 'icon'])(types) ?? (
|
||||||
|
<Wrench height={16} width={16} />
|
||||||
|
)
|
||||||
const age = prettyMs(new Date().getTime() - new Date(created).getTime(), {
|
const age = prettyMs(new Date().getTime() - new Date(created).getTime(), {
|
||||||
compact: true,
|
compact: true,
|
||||||
verbose: true
|
verbose: true
|
||||||
|
|
@ -57,7 +74,9 @@ const NotificationRow = ({
|
||||||
classes.notificationRow,
|
classes.notificationRow,
|
||||||
!read && valid ? classes.unread : ''
|
!read && valid ? classes.unread : ''
|
||||||
)}>
|
)}>
|
||||||
<div className={classes.notificationRowIcon}>{icon}</div>
|
<div className={classes.notificationRowIcon}>
|
||||||
|
<div>{icon}</div>
|
||||||
|
</div>
|
||||||
<div className={classes.notificationContent}>
|
<div className={classes.notificationContent}>
|
||||||
<Label2 className={classes.notificationTitle}>
|
<Label2 className={classes.notificationTitle}>
|
||||||
{notificationTitle}
|
{notificationTitle}
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<svg width="32px" height="32px" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
<svg width="32px" height="32px" viewBox="0 0 18 18" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||||
<g id="↳-notification-center" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" stroke-linecap="round" stroke-linejoin="round">
|
<g id="↳-notification-center" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" stroke-linecap="round" stroke-linejoin="round">
|
||||||
<g id="notification-center_v01a#2-(open)" transform="translate(-1023.000000, -459.000000)" stroke="#1B2559">
|
<g id="notification-center_v01a#2-(open)" transform="translate(-1023.000000, -459.000000)" stroke="#1B2559">
|
||||||
<g id="Group-5" transform="translate(1000.000000, 0.000000)">
|
<g id="Group-5" transform="translate(1000.000000, 0.000000)">
|
||||||
|
|
|
||||||
|
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.4 KiB |
Loading…
Add table
Add a link
Reference in a new issue