Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion packages/@react-spectrum/s2/src/Toast.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,10 @@ const toastContent = style({
alignItems: 'baseline',
gridArea: 'content',
cursor: 'default',
width: 'fit'
width: 'fit',
overflowWrap: 'break-word',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wordBreak: 'break-word',
minWidth: 0
});

const controls = style({
Expand Down
5 changes: 5 additions & 0 deletions packages/@react-spectrum/s2/stories/Toast.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,11 @@ export const Example: Story = {
variant="accent">
Show Long Toast
</Button>
<Button
onPress={() => UNSTABLE_ToastQueue.info('LoremipsumdolorsitametconsecteturadipiscingelitseddoeiusmodtemporincididuntutlaboreetdoloremagnaaliquaUtenimaminimveniamquisnostrudexercitationullamcolaborisnisiutaliquipeacommodoconsequat.', {...args, onClose: action('onClose')})}
variant="accent">
Show Long Word Toast
</Button>
</ButtonGroup>
</>
)
Expand Down
2 changes: 1 addition & 1 deletion packages/@react-spectrum/s2/style/spectrum-theme.ts
Original file line number Diff line number Diff line change
Expand Up @@ -828,7 +828,7 @@ export const style = createTheme({
hyphens: ['none', 'manual', 'auto'] as const,
whiteSpace: ['normal', 'nowrap', 'pre', 'pre-line', 'pre-wrap', 'break-spaces'] as const,
textWrap: ['wrap', 'nowrap', 'balance', 'pretty'] as const,
wordBreak: ['normal', 'break-all', 'keep-all'] as const,
wordBreak: ['normal', 'break-all', 'keep-all', 'break-word'] as const,
overflowWrap: ['normal', 'anywhere', 'break-word'] as const,
boxDecorationBreak: ['slice', 'clone'] as const,

Expand Down