Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
nexpie-grafana-theme
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Registry
Registry
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kornkitt Poolsup
nexpie-grafana-theme
Commits
93ecf63e
Unverified
Commit
93ecf63e
authored
Aug 13, 2019
by
Tobias Skarhed
Committed by
GitHub
Aug 13, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
InfoTooltip: Info icon with tooltip (#18478)
parent
993e5636
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
25 additions
and
1 deletions
+25
-1
packages/grafana-ui/src/components/InfoTooltip/InfoTooltip.story.tsx
+9
-0
packages/grafana-ui/src/components/InfoTooltip/InfoTooltip.tsx
+15
-0
packages/grafana-ui/src/components/Tooltip/Tooltip.tsx
+1
-1
No files found.
packages/grafana-ui/src/components/InfoTooltip/InfoTooltip.story.tsx
0 → 100644
View file @
93ecf63e
import
React
from
'react'
;
import
{
storiesOf
}
from
'@storybook/react'
;
import
{
withCenteredStory
}
from
'../../utils/storybook/withCenteredStory'
;
import
{
InfoTooltip
}
from
'./InfoTooltip'
;
const
story
=
storiesOf
(
'UI/Tooltip'
,
module
);
story
.
addDecorator
(
withCenteredStory
);
story
.
add
(
'InfoTooltip'
,
()
=>
<
InfoTooltip
>
This is the content of the tooltip
</
InfoTooltip
>);
packages/grafana-ui/src/components/InfoTooltip/InfoTooltip.tsx
0 → 100644
View file @
93ecf63e
import
React
from
'react'
;
import
{
Tooltip
,
TooltipProps
}
from
'../Tooltip/Tooltip'
;
import
{
PopperContent
}
from
'../Tooltip/PopperController'
;
interface
InfoTooltipProps
extends
Omit
<
TooltipProps
,
'children'
|
'content'
>
{
children
:
PopperContent
<
any
>
;
}
export
const
InfoTooltip
=
({
children
,
...
restProps
}:
InfoTooltipProps
)
=>
{
return
(
<
Tooltip
content=
{
children
}
{
...
restProps
}
>
<
i
className=
"fa fa-info-circle"
/>
</
Tooltip
>
);
};
packages/grafana-ui/src/components/Tooltip/Tooltip.tsx
View file @
93ecf63e
...
@@ -3,7 +3,7 @@ import * as PopperJS from 'popper.js';
...
@@ -3,7 +3,7 @@ import * as PopperJS from 'popper.js';
import
{
Popper
}
from
'./Popper'
;
import
{
Popper
}
from
'./Popper'
;
import
{
PopperController
,
UsingPopperProps
}
from
'./PopperController'
;
import
{
PopperController
,
UsingPopperProps
}
from
'./PopperController'
;
interface
TooltipProps
extends
UsingPopperProps
{
export
interface
TooltipProps
extends
UsingPopperProps
{
theme
?:
'info'
|
'error'
;
theme
?:
'info'
|
'error'
;
}
}
export
const
Tooltip
=
({
children
,
theme
,
...
controllerProps
}:
TooltipProps
)
=>
{
export
const
Tooltip
=
({
children
,
theme
,
...
controllerProps
}:
TooltipProps
)
=>
{
...
...
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