Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ Check example: [React-tooltip Test](http://wwayne.com/react-tooltip)
Global|Specific |Type |Values | Description
|:---|:---|:---|:---|:----
place | data-place | String | top, right, bottom, left | placement
type | data-type | String | success, warning, error, info, light | theme
type | data-type | String | success, warning, error, info, light, custom | theme
effect| data-effect | String | float, solid | behaviour of tooltip
event | data-event | String | e.g. click | custom event to trigger tooltip
eventOff | data-event-off | String | e.g. click | custom event to hide tooltip (only makes effect after setting event attribute)
Expand Down
3 changes: 2 additions & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -439,7 +439,8 @@ class ReactTooltip extends Component {
{'type-warning': this.state.type === 'warning'},
{'type-error': this.state.type === 'error'},
{'type-info': this.state.type === 'info'},
{'type-light': this.state.type === 'light'}
{'type-light': this.state.type === 'light'},
{'type-custom': !this.state.type}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so 'custom' ends up being the same as not specifying a type, correct?

To merge this, I'd like to see an example added to illustrate how to use it.

)

let Wrapper = this.props.wrapper
Expand Down
6 changes: 3 additions & 3 deletions src/index.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
@mixin type($background-color) {
background-color: $background-color;
border-radius: 3px;
font-size: 13px;
padding: 8px 21px;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see what you want to do - but adding them to something named 'background-color' seems misleading. Maybe we can define another mixing type, like base-sizing or something?

&.place-top {
&:after {
border-top-color: $background-color;
Expand Down Expand Up @@ -55,12 +58,9 @@
}

.__react_component_tooltip {
border-radius: 3px;
display: inline-block;
font-size: 13px;
left: -999em;
opacity: 0;
padding: 8px 21px;
position: fixed;
pointer-events: none;
transition: opacity 0.3s ease-out;
Expand Down
2 changes: 1 addition & 1 deletion src/style.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading