Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 | import styled, { css } from 'styled-components'; import animations from './../Animations'; import defaultTheme from '../theme'; const StyledNotifyWrapper = styled.div` display: grid; margin: 5px; `; const StyledNotify = styled.div` display: table; background: ${props => props.theme.notifyBgColor}; border-radius: 4px; padding: 3px; height: 100%; min-height: 60px; min-width: 250px; max-width: 350px; cursor: pointer; animation: ${animations.slideInRight} 500ms ease-in; &.close { animation: ${animations.slideRight} 500ms ease-in forwards; } .notification-icon { animation: ${animations.shake} 1s linear; height: 100%; width: 60px; float: left; display: flex; justify-content: center; align-items: center; } .notification-body { position: relative; height: 100%; width: calc(100% - 68px); float: left; border-radius: 4px; padding: 4px; background-color: ${props => props.theme.lightColor}; box-shadow: rgba(0, 0, 0, 0.12) 0px 1px 6px, rgba(0, 0, 0, 0.12) 0px 1px 4px; } .notification-close { position: absolute; top: 0px; right: 5px; font-size: 18px; cursor: pointer; } .notification-close:before { content: '\00d7'; color: ${props => props.theme.grayColor}; } .notification-title { font-size: 16px; padding: 5px; margin: 0; color: ${props => props.theme.grayColorDark}; ${props => props.type === 'error' && css` color: ${props => props.theme.controlErrorColor}; `} ${props => props.type === 'warning' && css` color: ${props => props.theme.controlWarningColor}; `} ${props => props.type === 'success' && css` color: ${props => props.theme.controlSuccessColor}; `}; } .notification-message { padding: 0 5px; margin: 0; font-size: 14px; color: ${props => props.theme.grayColorDark}; } ${props => props.style && css` ${props.style}; `}; `; StyledNotifyWrapper.defaultProps = { theme: defaultTheme, }; StyledNotify.defaultProps = { theme: defaultTheme, }; export { StyledNotifyWrapper, StyledNotify }; |