Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
paragon
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenEdx
paragon
Commits
5172db1a
Commit
5172db1a
authored
Nov 06, 2017
by
Michael Roytman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
this didn't go in the original commit?
parent
8d90814d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
5 deletions
+15
-5
src/ToolTip/index.jsx
+15
-5
No files found.
src/ToolTip/index.jsx
View file @
5172db1a
...
...
@@ -35,17 +35,27 @@ export default class Tooltip extends React.Component {
// <Button
// label={<span>Mouse over me for a tooltip!</span>}
// />
// {this.state.mouseOver && <span className={classNames(styles['tooltip-inner'], styles['tooltip-bottom'])}>Tooltip text</span>}
// {this.state.mouseOver && <span className={classNames(styles['tooltip-inner'],
// styles['tooltip-bottom'])}>Tooltip text</span>}
// </div>
// );
return
(
<
div
className=
{
classNames
(
styles
.
tooltip
,
styles
.
show
)
}
role=
"tooltip"
onMouseOver=
{
this
.
handleMouseOver
}
onMouseOut=
{
this
.
handleMouseOut
}
>
<
div
className=
{
classNames
(
styles
.
tooltip
,
styles
.
show
)
}
role=
"tooltip"
onMouseOver=
{
this
.
handleMouseOver
}
onMouseOut=
{
this
.
handleMouseOut
}
>
{
this
.
props
.
children
}
<
Button
label=
"Tooltip!"
/>
<
div
className=
{
classNames
(
styles
[
'arrow'
])
}
/>
{
this
.
state
.
mouseOver
&&
<
div
className=
{
classNames
(
styles
[
'tooltip-inner'
])
}
>
I am the tooltip!
</
div
>
}
<
div
className=
{
classNames
(
styles
.
arrow
)
}
/>
{
this
.
state
.
mouseOver
&&
<
div
className=
{
classNames
(
styles
[
'tooltip-inner'
])
}
>
I am the tooltip!
{
this
.
props
.
toolTipText
}
</
div
>
}
</
div
>
);
}
...
...
@@ -54,7 +64,7 @@ export default class Tooltip extends React.Component {
Tooltip
.
propTypes
=
{
toolTipText
:
PropTypes
.
oneOfType
([
PropTypes
.
string
,
PropTypes
.
element
]).
isRequired
,
toolTipPosition
:
PropTypes
.
string
.
isRequired
,
//
toolTipPosition: PropTypes.string.isRequired,
children
:
PropTypes
.
element
.
isRequired
,
};
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment