#Wrap text inside a button

7 messages · Page 1 of 1 (latest)

elfin canopy
#

How do I wrap text in a button at a fixed width?

wide heron
elfin canopy
#

At the moment my button looks like this. The text still does not seem to wrap. Which styles would i need to apply?

inner: {
 whiteSpace: "normal",
 wordWrap: "break-word",
},
root: {
 whiteSpace: "normal",
 wordWrap: "break-word",
}
}} w="100%" variant="outline" onClick={() => onSelect(s)}>{s}</Button>```
wide heron
elfin canopy
#

I'll give it a shot. Thanks

heady lotus
#

Do you not need whiteSpace set to pre-wrap

#

Or actually it might just be wrap