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
b08cf1e7
Unverified
Commit
b08cf1e7
authored
May 07, 2019
by
Ryan McKinley
Committed by
GitHub
May 07, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Plugins: update beta notice style (#16928)
parent
b24358aa
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
4 deletions
+16
-4
public/app/features/plugins/PluginStateInfo.tsx
+16
-4
No files found.
public/app/features/plugins/PluginStateInfo.tsx
View file @
b08cf1e7
import
React
,
{
FC
,
useContext
}
from
'react'
;
import
{
css
}
from
'emotion'
;
import
{
PluginState
,
Tooltip
,
ThemeContext
}
from
'@grafana/ui'
;
import
{
PopperContent
}
from
'@grafana/ui/src/components/Tooltip/PopperController'
;
interface
Props
{
state
?:
PluginState
;
}
function
getPluginStateInfoText
(
state
?:
PluginState
):
string
|
null
{
function
getPluginStateInfoText
(
state
?:
PluginState
):
PopperContent
<
any
>
|
null
{
switch
(
state
)
{
case
PluginState
.
alpha
:
return
'Plugin in alpha state. Means work in progress and updates may include breaking changes.'
;
return
(
<
div
>
<
h5
>
Alpha Plugin
</
h5
>
<
p
>
This plugin is a work in progress and updates may include breaking changes.
</
p
>
</
div
>
);
case
PluginState
.
beta
:
return
'Plugin in beta state. Means there could be bugs and minor breaking changes.'
;
return
(
<
div
>
<
h5
>
Beta Plugin
</
h5
>
<
p
>
There could be bugs and minor breaking changes to this plugin.
</
p
>
</
div
>
);
}
return
null
;
}
...
...
@@ -34,10 +45,11 @@ const PluginStateinfo: FC<Props> = props => {
font-size: 13px;
padding: 4px 8px;
margin-left: 16px;
cursor: help;
`
;
return
(
<
Tooltip
content=
{
text
}
>
<
Tooltip
content=
{
text
}
theme=
{
'info'
}
placement=
{
'top'
}
>
<
div
className=
{
styles
}
>
<
i
className=
"fa fa-warning"
/>
{
props
.
state
}
</
div
>
...
...
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