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
adda84d1
Commit
adda84d1
authored
Sep 21, 2017
by
Torkel Ödegaard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tech: removed test component
parent
837beda1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
67 deletions
+0
-67
public/app/core/components/CoolButton.tsx
+0
-67
No files found.
public/app/core/components/CoolButton.tsx
deleted
100644 → 0
View file @
837beda1
import
*
as
React
from
'react'
;
import
*
as
ReactDOM
from
'react-dom'
;
import
coreModule
from
'../core_module'
;
export
interface
ICoolButtonProps
{
count
:
number
;
}
export
interface
ICoolButtonState
{
count
:
number
;
}
export
class
CoolButton
extends
React
.
Component
<
ICoolButtonProps
,
ICoolButtonState
>
{
constructor
(
props
)
{
super
(
props
);
this
.
state
=
{
count
:
1
};
}
onClick
()
{
this
.
setState
(
prevState
=>
({
count
:
prevState
.
count
+
1
}));
console
.
log
(
this
.
state
.
count
);
}
render
()
{
return
(
<
div
>
<
h2
onClick=
{
this
.
onClick
.
bind
(
this
)
}
>
Hello
</
h2
>
<
div
>
{
this
.
state
.
count
}
</
div
>
<
a
href=
"/alerting"
>
Go to alerting
</
a
>
</
div
>
);
}
}
export
interface
Props
{
fname
:
string
;
onClick
:
()
=>
void
;
}
function
SecondButton
({
fname
,
onClick
}:
Props
)
{
return
(
<
div
className=
"hello"
>
<
div
className=
"greeting"
>
Hello
{
fname
}
</
div
>
<
div
>
<
button
onClick=
{
onClick
}
>
button
</
button
>
</
div
>
</
div
>
);
}
coreModule
.
directive
(
'coolButton'
,
function
(
reactDirective
)
{
return
reactDirective
(
CoolButton
);
});
coreModule
.
directive
(
'secondButton'
,
function
(
reactDirective
)
{
return
reactDirective
(
SecondButton
,
[
[
'fname'
,
{
watchDepth
:
'value'
}]
]);
});
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