react-zoom-pan-pinch icon indicating copy to clipboard operation
react-zoom-pan-pinch copied to clipboard

Allow to pass style/className to TransformWrapper & TransformComponent

Open caub opened this issue 1 year ago • 3 comments

Is your feature request related to a problem? Please describe. I'd like to pass either className="d-flex flex-column flex-1" or style={{ display: 'flex', flexDirection: 'column', flex: 1 }} to both TransformWrapper and TransformComponent

The goal is to make the component fill all content horizontally

Describe alternatives you've considered For now I'll apply these styles from the parent element, but it's not ideal, it could break if you change your classes

.react-transform-wrapper, .react-transform-component {
  display: flex;
  flex-direction: column;
  flex: 1;
}

caub avatar Dec 08 '24 17:12 caub

+1

enchorb avatar Dec 16 '24 15:12 enchorb

I also would like to see this to avoid using inline styles. I was confused why wrapperClass on TransferComponent would not have any effect but wrapperStyle would but I guess wrapperClass is something completely different?

jgonera avatar Apr 24 '25 00:04 jgonera

wrapperClass and wrapperStyle both apply (respectively, class names or style) to the WrapperComponent. I found wrapperClass not to work sometimes because of conflicts with other built-in classes, in which cases I used wrapperStyle to take precedence. componentClass and componentStyle do the same to the TransformComponent. Should this issue be closed?

DamianoMagrini avatar Aug 19 '25 19:08 DamianoMagrini