Advertisement
Guest User

Untitled

a guest
Jan 21st, 2020
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.60 KB | None | 0 0
  1. const getBackgroundColor = ({ type, colors }) => {
  2. if (type === 'success') {
  3. return colors['red'];
  4. }
  5.  
  6. return colors['green'];
  7. };
  8. const ToastMessageContainer = styled.div.withConfig({ displayName: 'ToastMessageContainer' })`
  9. display: flex;
  10. text-align: center;
  11. align-items: center;
  12. flex-direction: row;
  13. background-color: ${props => getBackgroundColor({
  14. type: props.type,
  15. colors: props.theme.text.color,
  16. })};
  17. color: ${props => props.theme.colors.white.opaque};
  18. font-size: ${props => props.theme.text.size.sectionTitleM};
  19. max-width: 45rem;
  20. border-radius: 0.8rem;
  21. `;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement