Bug - ClipboardCopy - preview for expansion variant does not stringify properly for all allowed types
Describe the problem Follow up to #9711 as the previous fix had to be reverted because it was an unintentional breaking change.
The new approach should solve the issue without limiting the allowed types of ClipboardCopy to only a string.
A potential solution is that:
- the expansion preview (or maybe expansion variant?) should not allow react node child
- documentation is improved to let users know that if they do indeed pass something other than string as the child, they will need to override onCopy
Expected behavior Expansion variants do not provide an improperly stringified preview
Screenshots
CC @gitdallas
Although I'm unsure what people may want to add to the expansion variant other than a string, I don't want to assume people won't have some requirement to do so. I think it may be suitable to use the outcome of onCopy as the value to put in the expansion preview.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.
This issue has been closed because it has not had activity since being marked as stale.