-
Notifications
You must be signed in to change notification settings - Fork 80
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
Feature/anxr 202 tooltip #247
Conversation
still need to write tests |
/** | ||
* Indicates whether the ToolTip will render or not. Defaults to `true`. | ||
*/ | ||
isExpanded: bool, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i just kept this since it maps to ContextMenu
's isExpanded
, but should it be isShown
here instead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm fine with isExpanded
|
||
const matcher = _.matches({ direction, alignment }); | ||
|
||
if (matcher({ direction: UP, alignment: START })) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice, very readable
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it would be even more readable if it was called matches
or isMatch
instead of matcher
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
didn't want to clash with _.matches
, and wanted to make it clear it's a function. 🤷
...flyOutStyle, | ||
maxWidth: flyOutMaxWidth || flyOutStyle.maxWidth || 200 | ||
}} | ||
className={flyOutCx('&', { [`${className}-FlyOut`]: className }, `&-${direction}`, `&-${alignment}`, `&-${kind}`)} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is an odd thing to do
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
which part
@@ -205,7 +205,7 @@ const ToolTip = createClass({ | |||
|
|||
return ( | |||
<ContextMenu | |||
className={cx('&', '&-base', className)} | |||
className={className} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this should still have the ToolTip classname on it at the least:
className={cx('&', className)}
{isCloseable ? <CrossIcon onClick={this.handleClose} className={flyOutCx('&-close')}/> : null} | ||
<h2 className={flyOutCx('&-title')}>{title}</h2> | ||
{isCloseable ? <CrossIcon onClick={this.handleClose} className={flyOutCx('&-Close')}/> : null} | ||
<h2 className={flyOutCx('&-Title')}>{title}</h2> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is perfect
906ccc4
to
c8ad6fe
Compare
PR Checklist
common
at minimum)semver-
labelskind
prop)isCloseable
/onClose
closes #234