Skip to content

Commit eda4c21

Browse files
authored
Forms: apply tip-styles on mobile responses as well (#45846)
1 parent e91a7b2 commit eda4c21

File tree

3 files changed

+34
-18
lines changed

3 files changed

+34
-18
lines changed
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
Significance: patch
2+
Type: fixed
3+
4+
Forms: apply tip-styles on mobile responses as well

projects/packages/forms/src/dashboard/components/response-view/body.tsx

Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -536,21 +536,25 @@ const ResponseViewBody = ( {
536536
</ConfirmDialog>
537537
</div>
538538
{ response.status === 'spam' && (
539-
<Tip>{ __( 'Spam responses are moved to trash after 15 days.', 'jetpack-forms' ) }</Tip>
539+
<div className="jp-forms__inbox__tip-container">
540+
<Tip>{ __( 'Spam responses are moved to trash after 15 days.', 'jetpack-forms' ) }</Tip>
541+
</div>
540542
) }
541543
{ response.status === 'trash' && (
542-
<Tip>
543-
{ sprintf(
544-
/* translators: %d number of days. */
545-
_n(
546-
'Items in trash are permanently deleted after %d day.',
547-
'Items in trash are permanently deleted after %d days.',
548-
emptyTrashDays,
549-
'jetpack-forms'
550-
),
551-
emptyTrashDays
552-
) }
553-
</Tip>
544+
<div className="jp-forms__inbox__tip-container">
545+
<Tip>
546+
{ sprintf(
547+
/* translators: %d number of days. */
548+
_n(
549+
'Items in trash are permanently deleted after %d day.',
550+
'Items in trash are permanently deleted after %d days.',
551+
emptyTrashDays,
552+
'jetpack-forms'
553+
),
554+
emptyTrashDays
555+
) }
556+
</Tip>
557+
</div>
554558
) }
555559
</>
556560
);

projects/packages/forms/src/dashboard/inbox/style.scss

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -459,13 +459,22 @@
459459
height: calc(100vh - var(--wp-admin--admin-bar--height, 32px) - 57px);
460460
margin-bottom: 57px;
461461
}
462+
}
463+
464+
.jp-forms__inbox__tip-container {
465+
border-top: 1px solid var(--jp-forms-border-color);
466+
margin: 8px 0 0 0;
467+
padding: 16px 0;
468+
text-wrap: balance;
462469

470+
// https://wordpress.github.io/gutenberg/?path=/docs/components-tip--docs
463471
.components-tip {
464472
align-items: anchor-center;
465-
border-top: 1px solid var(--jp-forms-border-color);
466-
margin: 8px 0 56px 0;
467-
padding: 16px;
468-
text-wrap: pretty;
473+
}
474+
475+
@media (min-width: 782px) {
476+
padding: 16px 32px;
477+
margin-bottom: 57px; // Compensate for fixed footer from DataViews
469478
}
470479
}
471480

@@ -481,7 +490,6 @@
481490
}
482491
}
483492

484-
485493
/*
486494
* We need to make the available canvas 100% tall. Without this,
487495
* no flex values will work, they will only use the available space.

0 commit comments

Comments
 (0)