New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Supporting className on wrapper node for 3.x.x #113

Closed
wants to merge 2 commits into
base: master
from

Conversation

Projects
None yet
4 participants
@slorber
Contributor

slorber commented Dec 6, 2016

className support has been removed as a breaking change in 3.0.0 but I think it was a breaking change that is annoying me in my application, and it didn't have to get removed.

The idea of 3.0.0 was to support latest React 15.4.1 and stop usage of internal React API's, but supporting className was not using internal apis so it didn't have to be removed

@STRML

This comment has been minimized.

Contributor

STRML commented Dec 6, 2016

I agree that it would be okay and expected to handle className; many components do and I agree that a bare <div> at the root can be annoying/unexpected.

This gets a 👍 with the caveat that, as mentioned in #105 (comment), any further properties that would generally be supported on DOM components are explicitly unsupported.

It may also help to add a non-production check for any on* and style props and warn the developer.

@tajo

This comment has been minimized.

Owner

tajo commented Dec 29, 2016

Sorry for the inconvenience! I don't want to support/release multiple branches. I'm trying to put together v4 and move forward. So, I'm closing this.

@tajo tajo closed this Dec 29, 2016

@jgoux

This comment has been minimized.

jgoux commented Jan 16, 2017

I hope className will be supported again, very convenient to use along with styled-components!

const Dialog = styled(Portal)`
  position: fixed;
  z-index: 1500;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment