Skip to content

Commit 9c2043f

Browse files
committed
fix(emails): restore row spacing in the batch-invitation workspace list
1 parent 9e3ba41 commit 9c2043f

2 files changed

Lines changed: 15 additions & 6 deletions

File tree

apps/sim/components/emails/_styles/base.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,12 @@ export const baseStyles = {
275275
margin: '0 0 8px 0',
276276
},
277277

278-
/** Info box list content */
278+
/**
279+
* Info box body copy.
280+
*
281+
* `margin: 0` — so multi-row content must be ONE `Text` with `<br />` between
282+
* rows, never several `Text` nodes, which would stack flush with no gap.
283+
*/
279284
infoBoxList: {
280285
fontSize: typography.fontSize.md,
281286
lineHeight: '1.6',

apps/sim/components/emails/invitations/batch-invitation-email.tsx

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import { Fragment } from 'react'
12
import { Section, Text } from '@react-email/components'
23
import { baseStyles } from '@/components/emails/_styles'
34
import { EmailButton, EmailLayout, EmailStrong } from '@/components/emails/components'
@@ -80,11 +81,14 @@ export function BatchInvitationEmail({
8081
Workspace access ({workspaceInvitations.length} workspace
8182
{workspaceInvitations.length !== 1 ? 's' : ''})
8283
</Text>
83-
{workspaceInvitations.map((ws) => (
84-
<Text key={ws.workspaceId} style={baseStyles.infoBoxList}>
85-
{ws.workspaceName}{getPermissionLabel(ws.permission)}
86-
</Text>
87-
))}
84+
<Text style={baseStyles.infoBoxList}>
85+
{workspaceInvitations.map((ws, index) => (
86+
<Fragment key={ws.workspaceId}>
87+
{index > 0 && <br />}
88+
{ws.workspaceName}{getPermissionLabel(ws.permission)}
89+
</Fragment>
90+
))}
91+
</Text>
8892
</Section>
8993
)}
9094

0 commit comments

Comments
 (0)