react-show-more icon indicating copy to clipboard operation
react-show-more copied to clipboard

Moving onClick event to React node

Open Trinitonn opened this issue 5 months ago • 0 comments

When you supply a React node, I'd like to move the onClick event to the React node instead of the surrounding span element.

In my case I wanted to center a small button below the text in the center of the parent container that holds the text. Moving the onClick event makes sure you need to click the button (and not the span element which is 100% width of the parent container).

Before this change you could click anywhere to the left or right of the button instead of straight on it.

Trinitonn avatar Jan 20 '24 23:01 Trinitonn