SHARE
TWEET

Untitled

a guest Jan 21st, 2020 61 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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. `;
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top