|
1 | 1 | import { icons } from '@suite-common/icons/src/icons'; |
| 2 | +import { breakpoints } from '@trezor/theme'; |
2 | 3 |
|
3 | 4 | /** |
4 | | - * @deprecated This key is deprecated. Please use `useLayoutSize` hook. |
| 5 | + * @deprecated This key is deprecated. Please use `useLayoutSize` hook or breakpoints from `@trezor/theme`. |
5 | 6 | */ |
6 | 7 | export const SCREEN_SIZE = { |
7 | | - UNAVAILABLE: '260px', |
8 | | - SM: '576px', // phones |
9 | | - MD: '768px', // tablets |
10 | | - LG: '992px', // laptops/desktops |
11 | | - XL: '1200px', // extra Large laptops/desktops |
| 8 | + UNAVAILABLE: `${breakpoints.unavailable}px`, |
| 9 | + SM: `${breakpoints.mobile}px`, |
| 10 | + MD: `${breakpoints.tablet}px`, |
| 11 | + LG: `${breakpoints.laptop}px`, |
| 12 | + XL: `${breakpoints.desktop}px`, |
12 | 13 | } as const; |
13 | 14 |
|
14 | | -// Temporary solution to enable the simultaneous use of above and below breakpoints, ideally SCREEN SIZE should be just numbers IMO |
15 | 15 | const HELPER_SCREEN_SIZE = { |
16 | | - SM: '575px', // phones |
17 | | - MD: '767px', // tablets |
18 | | - LG: '991px', // laptops/desktops |
19 | | - XL: '1199px', // extra Large laptops/desktops |
| 16 | + SM: `${breakpoints.mobile - 1}px`, |
| 17 | + MD: `${breakpoints.tablet - 1}px`, |
| 18 | + LG: `${breakpoints.laptop - 1}px`, |
| 19 | + XL: `${breakpoints.desktop - 1}px`, |
20 | 20 | }; |
21 | 21 |
|
22 | 22 | /** |
23 | | - * @deprecated This key is deprecated. Please use `useLayoutSize` hook. |
| 23 | + * @deprecated This key is deprecated. Please use `useLayoutSize` hook or breakpoints from `@trezor/theme`. |
24 | 24 | */ |
25 | 25 | export const SCREEN_QUERY = { |
26 | 26 | MOBILE: `@media (max-width: ${HELPER_SCREEN_SIZE.SM})`, |
|
0 commit comments