File tree 3 files changed +25
-15
lines changed
twenty-front/src/modules/ui/feedback/snack-bar-manager/components
twenty-ui/src/theme/constants
3 files changed +25
-15
lines changed Original file line number Diff line number Diff line change 7
7
IconInfoCircle ,
8
8
IconSquareRoundedCheck ,
9
9
IconX ,
10
+ MOBILE_VIEWPORT ,
10
11
} from 'twenty-ui' ;
11
12
12
13
import { ProgressBar } from '@/ui/feedback/progress-bar/components/ProgressBar' ;
@@ -39,7 +40,7 @@ export type SnackBarProps = Pick<
39
40
} ;
40
41
41
42
const StyledContainer = styled . div `
42
- backdrop-filter: ${ ( { theme } ) => theme . blur . light } ;
43
+ backdrop-filter: ${ ( { theme } ) => theme . blur . medium } ;
43
44
background-color: ${ ( { theme } ) => theme . background . transparent . primary } ;
44
45
border-radius: ${ ( { theme } ) => theme . border . radius . md } ;
45
46
box-shadow: ${ ( { theme } ) => theme . boxShadow . strong } ;
@@ -49,6 +50,11 @@ const StyledContainer = styled.div`
49
50
padding: ${ ( { theme } ) => theme . spacing ( 2 ) } ;
50
51
position: relative;
51
52
width: 296px;
53
+
54
+ @media (max-width: ${ MOBILE_VIEWPORT } px) {
55
+ border-radius: 0;
56
+ width: 100%;
57
+ }
52
58
` ;
53
59
54
60
const StyledProgressBar = styled ( ProgressBar ) `
Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ import { MOBILE_VIEWPORT } from 'twenty-ui';
4
4
5
5
import { useSnackBarManagerScopedStates } from '@/ui/feedback/snack-bar-manager/hooks/internal/useSnackBarManagerScopedStates' ;
6
6
import { useSnackBar } from '@/ui/feedback/snack-bar-manager/hooks/useSnackBar' ;
7
+ import { useIsMobile } from '@/ui/utilities/responsive/hooks/useIsMobile' ;
7
8
8
9
import { SnackBar } from './SnackBar' ;
9
10
@@ -16,26 +17,28 @@ const StyledSnackBarContainer = styled.div`
16
17
z-index: ${ ( { theme } ) => theme . lastLayerZIndex } ;
17
18
18
19
@media (max-width: ${ MOBILE_VIEWPORT } px) {
19
- bottom: ${ ( { theme } ) => theme . spacing ( 16 ) } ;
20
- right: 50%;
21
- transform: translateX(50%);
20
+ top: 0;
21
+ bottom: auto;
22
+ left: 0;
23
+ right: 0;
22
24
}
23
25
` ;
24
26
25
- const variants = {
26
- out : {
27
- opacity : 0 ,
28
- y : 40 ,
29
- } ,
30
- in : {
31
- opacity : 1 ,
32
- y : 0 ,
33
- } ,
34
- } ;
35
-
36
27
export const SnackBarProvider = ( { children } : React . PropsWithChildren ) => {
37
28
const { snackBarInternal } = useSnackBarManagerScopedStates ( ) ;
38
29
const { handleSnackBarClose } = useSnackBar ( ) ;
30
+ const isMobile = useIsMobile ( ) ;
31
+
32
+ const variants = {
33
+ out : {
34
+ opacity : 0 ,
35
+ y : isMobile ? - 40 : 40 ,
36
+ } ,
37
+ in : {
38
+ opacity : 1 ,
39
+ y : 0 ,
40
+ } ,
41
+ } ;
39
42
40
43
return (
41
44
< >
Original file line number Diff line number Diff line change 1
1
export const BLUR = {
2
2
light : 'blur(6px)' ,
3
+ medium : 'blur(12px)' ,
3
4
strong : 'blur(20px)' ,
4
5
} ;
You can’t perform that action at this time.
0 commit comments