Add a prop to keep whitespace in <Text /> component #7127
Closed
jannikac
started this conversation in
Feature requests
Replies: 1 comment 1 reply
-
You can use |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi, I find myself often running into the problem that when I want to display text that a user entered, line breaks and whitespace are dropped. This is default behaviour with
p
orspan
tags
and you'd need to use either apre
tag or add the stylewhite-space: "pre-wrap"
. This is what im currently doing.I think it would be useful to add a property to the
Text
component of mantine likekeepWhitespace
orpreserveWhitespace
that either changes to root component to apre
tag or uses thewhite-space: "pre-wrap"
style.I can help with implementing if you want me to :)
Beta Was this translation helpful? Give feedback.
All reactions