toast
This commit is contained in:
@@ -1,21 +1,22 @@
|
||||
/* eslint-disable @cspell/spellchecker */
|
||||
import { Slide, ToastContainer } from 'react-toastify';
|
||||
import { ToastContainer } from 'react-toastify';
|
||||
import styled from 'styled-components';
|
||||
|
||||
const StyledNotiBar = styled(ToastContainer)`
|
||||
// https://styled-components.com/docs/faqs#how-can-i-override-styles-with-higher-specificity
|
||||
&&&.Toastify__toast-container {
|
||||
transform: translateX(2.5%);
|
||||
|
||||
}
|
||||
.Toastify__toast {
|
||||
min-height: auto;
|
||||
width: 95%;
|
||||
width: calc(100% - 32px);
|
||||
height: auto;
|
||||
|
||||
background-color: #262d42;
|
||||
margin-top: 20px;
|
||||
background-color: rgba(45, 52, 54, 0.8);
|
||||
box-sizing: border-box;
|
||||
color: #ffffff;
|
||||
|
||||
border-radius: 0px 0px 20px 20px;
|
||||
border-radius: 20px 20px 20px 20px;
|
||||
text-align: center;
|
||||
-webkit-box-shadow: 1px 1px 10px 0px rgba(43, 38, 38, 0.5);
|
||||
-moz-box-shadow: 1px 1px 10px 0px rgba(43, 38, 38, 0.5);
|
||||
@@ -23,7 +24,7 @@ const StyledNotiBar = styled(ToastContainer)`
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 0;
|
||||
padding: 6px 0 9px 0;
|
||||
}
|
||||
.Toastify__toast-body {
|
||||
padding: 0;
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
/* eslint-disable @cspell/spellchecker */
|
||||
import { cssTransition, ToastContainer } from 'react-toastify';
|
||||
import styled from 'styled-components';
|
||||
|
||||
@@ -8,12 +7,14 @@ const StyledSnackBar = styled(ToastContainer)`
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
bottom: 20px;
|
||||
bottom: 30px;
|
||||
pointer-events: none;
|
||||
margin-bottom: calc(env(safe-area-inset-top) / 3);
|
||||
z-index: 1000;
|
||||
}
|
||||
.Toastify__toast {
|
||||
pointer-events: none;
|
||||
calc(100% - 32px);
|
||||
height: auto;
|
||||
padding: 0;
|
||||
display: flex;
|
||||
@@ -23,8 +24,9 @@ const StyledSnackBar = styled(ToastContainer)`
|
||||
min-height: auto;
|
||||
border-radius: 50px;
|
||||
padding: 10px 20px;
|
||||
background-color: rgba(34, 37, 56, 0.555);
|
||||
background-color: rgba(45, 52, 54, 0.8);
|
||||
width: 85%;
|
||||
color: #ffffff
|
||||
}
|
||||
.Toastify__toast-body {
|
||||
padding: 0;
|
||||
@@ -53,7 +55,7 @@ export const SnackBar = () => {
|
||||
return (
|
||||
<StyledSnackBar
|
||||
position="bottom-center"
|
||||
autoClose={2000}
|
||||
autoClose={3000}
|
||||
limit={1}
|
||||
hideProgressBar
|
||||
newestOnTop={false}
|
||||
@@ -62,7 +64,6 @@ export const SnackBar = () => {
|
||||
pauseOnFocusLoss={false}
|
||||
draggable={false}
|
||||
pauseOnHover={false}
|
||||
transition={fade}
|
||||
containerId={'snackbar'}
|
||||
draggablePercent={10}
|
||||
closeButton={false}
|
||||
|
||||
Reference in New Issue
Block a user