1
+ import { useIsMobile } from '@/ui/utilities/responsive/hooks/useIsMobile' ;
1
2
import styled from '@emotion/styled' ;
2
- import { H2Title , IconPlus } from 'twenty-ui' ;
3
+ import { H2Title , IconPlus , MOBILE_VIEWPORT } from 'twenty-ui' ;
3
4
4
5
import { SettingsPageContainer } from '@/settings/components/SettingsPageContainer' ;
5
6
import { SettingsApiKeysTable } from '@/settings/developers/components/SettingsApiKeysTable' ;
@@ -15,9 +16,20 @@ const StyledButtonContainer = styled.div`
15
16
display: flex;
16
17
justify-content: flex-end;
17
18
padding-top: ${ ( { theme } ) => theme . spacing ( 2 ) } ;
19
+ @media (max-width: ${ MOBILE_VIEWPORT } px) {
20
+ padding-top: ${ ( { theme } ) => theme . spacing ( 5 ) } ;
21
+ }
22
+ ` ;
23
+
24
+ const StyledContainer = styled . div < { isMobile : boolean } > `
25
+ display: flex;
26
+ flex-direction: column;
27
+ overflow: hidden;
28
+ gap: ${ ( { theme } ) => theme . spacing ( 2 ) } ;
18
29
` ;
19
30
20
31
export const SettingsDevelopers = ( ) => {
32
+ const isMobile = useIsMobile ( ) ;
21
33
return (
22
34
< SubMenuTopBarContainer
23
35
title = "Developers"
@@ -31,38 +43,40 @@ export const SettingsDevelopers = () => {
31
43
] }
32
44
>
33
45
< SettingsPageContainer >
34
- < Section >
35
- < H2Title
36
- title = "API keys"
37
- description = "Active APIs keys created by you or your team."
38
- />
39
- < SettingsApiKeysTable />
40
- < StyledButtonContainer >
41
- < Button
42
- Icon = { IconPlus }
43
- title = "Create API key"
44
- size = "small"
45
- variant = "secondary"
46
- to = { '/settings/developers/api-keys/new' }
46
+ < StyledContainer isMobile = { isMobile } >
47
+ < Section >
48
+ < H2Title
49
+ title = "API keys"
50
+ description = "Active APIs keys created by you or your team."
47
51
/>
48
- </ StyledButtonContainer >
49
- </ Section >
50
- < Section >
51
- < H2Title
52
- title = "Webhooks "
53
- description = "Establish Webhook endpoints for notifications on asynchronous events. "
54
- />
55
- < SettingsWebhooksTable />
56
- < StyledButtonContainer >
57
- < Button
58
- Icon = { IconPlus }
59
- title = "Create Webhook"
60
- size = "small"
61
- variant = "secondary "
62
- to = { '/settings/developers/webhooks/new' }
52
+ < SettingsApiKeysTable / >
53
+ < StyledButtonContainer >
54
+ < Button
55
+ Icon = { IconPlus }
56
+ title = "Create API key "
57
+ size = "small "
58
+ variant = "secondary"
59
+ to = { '/settings/developers/api-keys/new' }
60
+ / >
61
+ </ StyledButtonContainer >
62
+ </ Section >
63
+ < Section >
64
+ < H2Title
65
+ title = "Webhooks "
66
+ description = "Establish Webhook endpoints for notifications on asynchronous events."
63
67
/>
64
- </ StyledButtonContainer >
65
- </ Section >
68
+ < SettingsWebhooksTable />
69
+ < StyledButtonContainer >
70
+ < Button
71
+ Icon = { IconPlus }
72
+ title = "Create Webhook"
73
+ size = "small"
74
+ variant = "secondary"
75
+ to = { '/settings/developers/webhooks/new' }
76
+ />
77
+ </ StyledButtonContainer >
78
+ </ Section >
79
+ </ StyledContainer >
66
80
</ SettingsPageContainer >
67
81
</ SubMenuTopBarContainer >
68
82
) ;
0 commit comments