react-rnd icon indicating copy to clipboard operation
react-rnd copied to clipboard

passing props to div container

Open Eliav2 opened this issue 4 years ago • 1 comments

does this component currently allows passing props to the div container? image

property like WrapperProps could solve this easily and I'm very surprised that such a popular lib doesn't have it

Eliav2 avatar Sep 30 '21 12:09 Eliav2

It used to exist, but it was removed in v8.0.0 as a breaking change.

I've been checking the code and the rest of properties will be passed to the Resizable component it renders (see here).

So, just pass the additional properties you want to pass, for example:

<Rnd
    // ...
    // Add your custom properties as any
    styles={{ backgroundColor: 'red' }}
/>

mikededo avatar Nov 10 '21 11:11 mikededo