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'}] - ]); -});