@@ -49,6 +49,10 @@ const SidebarCollapseExpandIcon = styled.button<{ close: boolean }>`
49
49
left: ${ ( { close } ) => ( close ? '-60px' : '-14px' ) } ;
50
50
z-index: 99;
51
51
background-color: ${ ( { theme } ) => theme . colors . ghost } ;
52
+
53
+ @media only screen and (max-width: 767px) {
54
+ top: 5px;
55
+ }
52
56
`
53
57
54
58
const Title = styled . button `
@@ -201,24 +205,45 @@ const PublishAndSaveToDraftContainer = styled.div`
201
205
gap: 0.75rem;
202
206
display: flex;
203
207
align-items: center;
208
+
209
+ @media only screen and (max-width: 450px) {
210
+ width: 100%;
211
+ justify-content: space-evenly;
212
+ }
204
213
`
205
214
const TitleAndBackButtonContainer = styled . div `
206
215
gap: 0.75rem;
207
216
display: flex;
208
217
align-items: center;
218
+
219
+ @media only screen and (max-width: 450px) {
220
+ width: 100%;
221
+ justify-content: space-around;
222
+ margin-right: 30px;
223
+ }
209
224
`
210
225
const PageWrapper = styled . div `
211
226
width: 100%;
212
227
height: 100%;
213
228
overflow-y: auto;
214
229
padding: 40px;
230
+
231
+ @media screen and (max-width: 450px) {
232
+ overflow-x: hidden;
233
+ }
215
234
`
216
235
const PageContent = styled . div `
217
236
// width: 50%;
218
237
width: 650px;
219
238
margin: 0px auto;
220
239
`
221
240
241
+ const ResourceTitle = styled ( EuiTitle ) `
242
+ @media screen and (max-width: 450px) {
243
+ font-size: 14px;
244
+ }
245
+ `
246
+
222
247
export function resolveDefaultFormValues (
223
248
resource : ResourceContract ,
224
249
data : AbstractData ,
@@ -358,11 +383,11 @@ export const ResourceFormView: React.FunctionComponent<{
358
383
>
359
384
Back
360
385
</ EuiButtonEmpty >
361
- < EuiTitle size = "xs" >
386
+ < ResourceTitle size = "xs" >
362
387
< h3 >
363
388
{ isEditing ? 'Edit' : 'Create' } { resource ?. name ?. toLowerCase ( ) }
364
389
</ h3 >
365
- </ EuiTitle >
390
+ </ ResourceTitle >
366
391
</ TitleAndBackButtonContainer >
367
392
< PublishAndSaveToDraftContainer >
368
393
< EuiButton fill > Save as draft</ EuiButton >
@@ -457,6 +482,12 @@ export function useCreateResourceForm({
457
482
}
458
483
}
459
484
485
+ const ResourceFormRow = styled ( EuiFormRow ) `
486
+ @media only screen and (max-width: 767px) {
487
+ width: 70vw;
488
+ }
489
+ `
490
+
460
491
export const ResourceForm : React . FunctionComponent < {
461
492
isEditing ?: boolean
462
493
createResourceForm : ReturnType < typeof useCreateResourceForm >
@@ -511,7 +542,7 @@ export const ResourceForm: React.FunctionComponent<{
511
542
key = { field . inputName }
512
543
focused = { activeField ?. inputName === field . inputName }
513
544
>
514
- < EuiFormRow
545
+ < ResourceFormRow
515
546
fullWidth
516
547
label = { field . label || field . name }
517
548
helpText = { field . description }
@@ -539,7 +570,7 @@ export const ResourceForm: React.FunctionComponent<{
539
570
setValue ( field . inputName , value )
540
571
} }
541
572
/>
542
- </ EuiFormRow >
573
+ </ ResourceFormRow >
543
574
</ FieldGroup >
544
575
)
545
576
} ) }
0 commit comments