Skip to content

Commit

Permalink
Preserve whitespace in errors (#6220)
Browse files Browse the repository at this point in the history
  • Loading branch information
timleslie authored Jul 29, 2021
1 parent 6da56b8 commit c2bb6a9
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .changeset/eleven-mayflies-kneel.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
'@keystone-ui/notice': patch
'@keystone-ui/toast': patch
---

Updated css to preserve whitespace formatting of error messages.
1 change: 1 addition & 0 deletions design-system/packages/notice/src/Notice.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ export const Notice = ({
flex: 1,
flexDirection: 'row',
outline: 0,
'white-space': 'pre-wrap',
...styles.box,
}}
tabIndex={0}
Expand Down
1 change: 1 addition & 0 deletions design-system/packages/toast/src/Toast.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,7 @@ export const ToastElement = forwardRef<HTMLDivElement, ToastElementProps>((props
width: 380, // less than desirable magic number, but not sure if this needs to be in theme...
maxWidth: '100%',
padding: spacing.large,
'white-space': 'pre-wrap',
}}
{...rest}
>
Expand Down

1 comment on commit c2bb6a9

@vercel
Copy link

@vercel vercel bot commented on c2bb6a9 Jul 29, 2021

Choose a reason for hiding this comment

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

Please sign in to comment.