Skip to content

Commit

Permalink
toastify
Browse files Browse the repository at this point in the history
  • Loading branch information
gabrieljablonski committed May 13, 2022
1 parent f4f3dac commit 5c7d058
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 1 deletion.
11 changes: 11 additions & 0 deletions src/components/ToastContainer/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import React from 'react';
import { ToastContainerProps } from 'react-toastify';

import { StyledContainer } from './styles';

const ToastContainer: React.FC<ToastContainerProps> = props => {
// eslint-disable-next-line react/jsx-props-no-spreading
return <StyledContainer {...props} />;
};

export default ToastContainer;
21 changes: 21 additions & 0 deletions src/components/ToastContainer/styles.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import { ToastContainer } from 'react-toastify';
import styled from 'styled-components';
import 'react-toastify/dist/ReactToastify.css';

// eslint-disable-next-line import/prefer-default-export
export const StyledContainer = styled(ToastContainer)`
.Toastify__toast-container {
}
.Toastify__toast {
background-color: var(--color-neutral-6);
}
.Toastify__toast-body {
white-space: pre-line;
}
.Toastify__progress-bar {
background-color: var(--color-primary-3);
}
`;
5 changes: 4 additions & 1 deletion src/components/index.ts
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
export { };
import ToastContainer from './ToastContainer';

// eslint-disable-next-line import/prefer-default-export
export { ToastContainer };

0 comments on commit 5c7d058

Please sign in to comment.