From adda84d124d960e28c479a4cc4d30a9a7173eb73 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torkel=20=C3=96degaard?= Date: Thu, 21 Sep 2017 14:05:24 +0200 Subject: [PATCH] tech: removed test component --- public/app/core/components/CoolButton.tsx | 67 ----------------------- 1 file changed, 67 deletions(-) delete mode 100644 public/app/core/components/CoolButton.tsx diff --git a/public/app/core/components/CoolButton.tsx b/public/app/core/components/CoolButton.tsx deleted file mode 100644 index 7dd7988c421..00000000000 --- a/public/app/core/components/CoolButton.tsx +++ /dev/null @@ -1,67 +0,0 @@ - -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 { - - constructor(props) { - super(props); - - this.state = {count: 1}; - } - - onClick() { - this.setState(prevState => ({ - count: prevState.count + 1 - })); - console.log(this.state.count); - } - - render() { - return ( -
-

Hello

-
{this.state.count}
- Go to alerting -
- ); - } -} - -export interface Props { - fname: string; - onClick: () => void; -} - -function SecondButton({fname, onClick}: Props) { - return ( -
-
- Hello {fname} -
-
- -
-
- ); -} - -coreModule.directive('coolButton', function(reactDirective) { - return reactDirective(CoolButton); -}); - -coreModule.directive('secondButton', function(reactDirective) { - return reactDirective(SecondButton, [ - ['fname', {watchDepth: 'value'}] - ]); -});