Mention the className prop decision in README ...#61
Open
ipeterov wants to merge 1 commit intoairbnb:masterfrom
Open
Mention the className prop decision in README ...#61ipeterov wants to merge 1 commit intoairbnb:masterfrom
ipeterov wants to merge 1 commit intoairbnb:masterfrom
Conversation
Author
|
Hey @ljharb, I added an FAQ section to the README to cover className/style props and possible alternatives. Does it make sense? |
ljharb
requested changes
May 2, 2024
Collaborator
ljharb
left a comment
There was a problem hiding this comment.
Thanks! Just a few tweaks, then it should be good to go
| ### display: `PropTypes.oneOf(['block', 'flex', 'inline-block', 'inline', 'contents'])` | ||
|
|
||
| By default, the `OutsideClickHandler` renders a `display: block` `<div />` to wrap the subtree defined by `children`. If desired, the `display` can be set to `inline-block`, `inline`, `flex`, or `contents` instead. There is no way not to render a wrapping `<div />`. | ||
|
|
|
|
||
| ## FAQ | ||
|
|
||
| ### I need the className or styles props, are they available? |
Collaborator
There was a problem hiding this comment.
Suggested change
| ### I need the className or styles props, are they available? | |
| ### I think I need the `className` or `style` props; are they available? |
| ## FAQ | ||
|
|
||
| ### I need the className or styles props, are they available? | ||
| Those particular props are not available as a design choice, [check out this article](https://medium.com/@JanPaul123/don-t-pass-css-classes-between-components-e9f7ab192785) for more in-depth reasoning. But if the props that are available don't cover your use-case, please create an issue and describe your use-case - we will be happy to accomodate it. |
Collaborator
There was a problem hiding this comment.
Suggested change
| Those particular props are not available as a design choice, [check out this article](https://medium.com/@JanPaul123/don-t-pass-css-classes-between-components-e9f7ab192785) for more in-depth reasoning. But if the props that are available don't cover your use-case, please create an issue and describe your use-case - we will be happy to accomodate it. | |
| Those particular props are not available as an intentional design choice. [Check out this article](https://medium.com/@JanPaul123/don-t-pass-css-classes-between-components-e9f7ab192785) for more in-depth reasoning. If the props that are available do not cover your use case, please create an issue and describe your it - we will be happy to consider accommodating it. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
...and offer some alternatives.