Add Modal, and HxDiv elements & Alert event fixes#88
Merged
nicko-winner merged 6 commits intomasterfrom May 15, 2020
Merged
Conversation
Contributor
nicko-winner
commented
May 8, 2020
- Create useEventListener hook for more terse hook creation
- Favoring shorter smaller wrappers with more ...rest passing, relying on prop types for prop documentation, Webstorm seems to handle this less explicit approach well.
- Add actions to Alert, and update update the event names we are listening for to be correct
- Move constants to a single file.
- create useEventListener hook for more terse hook creation - Favoring shorter smaller wrappers with more ...rest passing, relying on prop types for prop documentation, Webstorm seems to handle this less explicit approach well. - Add actions to Alert, and update update the event names we are listening for to be correct - Move constants to a single file.
|
Deploy preview for helix-react ready! Built with commit 0f69a97 |
michaelmang
approved these changes
May 15, 2020
Contributor
michaelmang
left a comment
There was a problem hiding this comment.
Looks great! Just left a few comments
| import React, { useRef, useEffect} from 'react'; | ||
| import React from 'react'; | ||
| import PropTypes from 'prop-types'; | ||
| import useEventListener from '../hooks/useEventListener'; |
src/Modal/index.js
Outdated
| <hx-modal | ||
| class={classNames(className, SIZES[size])} | ||
| ref={hxRef} | ||
| open={open ? true : null} |
Contributor
There was a problem hiding this comment.
I was wondering if there'd be a good util function to make to communicate why this is being done.
Some ideas:
noFalse
nullifyFalse
treatFalseAsNull
supportFalse
If we can't think of a good name, it's fine to leave as is
Contributor
Author
There was a problem hiding this comment.
wcBool() - short for web component boolean ?
wcBooleanAttribute() more descriptive, but kind of long.
Contributor
There was a problem hiding this comment.
I like it, a middleground for your second option would be wcBoolAttr
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.