react-svg-inline icon indicating copy to clipboard operation
react-svg-inline copied to clipboard

Add feature to skip applying the className to the wrapping component

Open aesopwolf opened this issue 8 years ago • 6 comments

This is useful when using inline CSS libraries such as aphrodite that don't support child selectors. For example, you can define your style definition with aphrodite like normal, then use this new component prop 'skipOuterClass' along with the prop classSuffix='' as a way to target just the child svg element.

aesopwolf avatar Sep 02 '16 23:09 aesopwolf

If you just className="" classSuffix="YourClass" this should do the same without any needs to modify this component, am I right?

MoOx avatar Sep 05 '16 07:09 MoOx

Ah, yup! Yeah that will work.

Technically you have to add a space before the class like this classSuffix=" YourClass", but that's not really a big deal.

aesopwolf avatar Sep 05 '16 15:09 aesopwolf

Maybe we could think of a better (simpler way)? What about classNameWrapper & className (no more suffix)?

MoOx avatar Sep 05 '16 20:09 MoOx

classNameWrapper and className is a good idea. Or the inverse could work too className and subClassName which is what I'm using on a similar component.

aesopwolf avatar Sep 06 '16 18:09 aesopwolf

is there any progress on this?

fennen529 avatar Mar 22 '18 19:03 fennen529

Can you push some docs about that please?

MoOx avatar Jun 07 '18 17:06 MoOx