Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const getBackgroundColor = ({ type, colors }) => {
- if (type === 'success') {
- return colors['red'];
- }
- return colors['green'];
- };
- const ToastMessageContainer = styled.div.withConfig({ displayName: 'ToastMessageContainer' })`
- display: flex;
- text-align: center;
- align-items: center;
- flex-direction: row;
- background-color: ${props => getBackgroundColor({
- type: props.type,
- colors: props.theme.text.color,
- })};
- color: ${props => props.theme.colors.white.opaque};
- font-size: ${props => props.theme.text.size.sectionTitleM};
- max-width: 45rem;
- border-radius: 0.8rem;
- `;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement