Commit 0b4d212b by Dominik Prokop

Fixing TS errors and updating snapshot

parent fae8ff57
import React, { PureComponent } from 'react'; import React, { PureComponent } from 'react';
import * as PopperJS from 'popper.js'; import * as PopperJS from 'popper.js';
import { Manager, Popper as ReactPopper } from 'react-popper'; import { Manager, Popper as ReactPopper } from 'react-popper';
import { Portal } from '@grafana/ui'; import { Portal } from '@grafana/ui';
...@@ -14,7 +14,7 @@ const defaultTransitionStyles = { ...@@ -14,7 +14,7 @@ const defaultTransitionStyles = {
opacity: 0, opacity: 0,
}; };
const transitionStyles = { const transitionStyles: {[key: string]: object} = {
exited: { opacity: 0 }, exited: { opacity: 0 },
entering: { opacity: 0 }, entering: { opacity: 0 },
entered: { opacity: 1 }, entered: { opacity: 1 },
......
...@@ -50,10 +50,10 @@ class PopperController extends React.Component<Props, State> { ...@@ -50,10 +50,10 @@ class PopperController extends React.Component<Props, State> {
componentWillReceiveProps(nextProps: Props) { componentWillReceiveProps(nextProps: Props) {
if (nextProps.placement && nextProps.placement !== this.state.placement) { if (nextProps.placement && nextProps.placement !== this.state.placement) {
this.setState(prevState => { this.setState((prevState: State) => {
return { return {
...prevState, ...prevState,
placement: nextProps.placement, placement: nextProps.placement || 'auto',
}; };
}); });
} }
......
...@@ -10,7 +10,7 @@ exports[`Render should render component 1`] = ` ...@@ -10,7 +10,7 @@ exports[`Render should render component 1`] = `
> >
External group sync External group sync
</h3> </h3>
<Tooltip <Component
content="Sync LDAP or OAuth groups with your Grafana teams." content="Sync LDAP or OAuth groups with your Grafana teams."
placement="auto" placement="auto"
> >
...@@ -21,7 +21,7 @@ exports[`Render should render component 1`] = ` ...@@ -21,7 +21,7 @@ exports[`Render should render component 1`] = `
className="gicon gicon-question gicon--has-hover" className="gicon gicon-question gicon--has-hover"
/> />
</div> </div>
</Tooltip> </Component>
<div <div
className="page-action-bar__spacer" className="page-action-bar__spacer"
/> />
...@@ -119,7 +119,7 @@ exports[`Render should render groups table 1`] = ` ...@@ -119,7 +119,7 @@ exports[`Render should render groups table 1`] = `
> >
External group sync External group sync
</h3> </h3>
<Tooltip <Component
content="Sync LDAP or OAuth groups with your Grafana teams." content="Sync LDAP or OAuth groups with your Grafana teams."
placement="auto" placement="auto"
> >
...@@ -130,7 +130,7 @@ exports[`Render should render groups table 1`] = ` ...@@ -130,7 +130,7 @@ exports[`Render should render groups table 1`] = `
className="gicon gicon-question gicon--has-hover" className="gicon gicon-question gicon--has-hover"
/> />
</div> </div>
</Tooltip> </Component>
<div <div
className="page-action-bar__spacer" className="page-action-bar__spacer"
/> />
......
...@@ -1112,7 +1112,7 @@ ...@@ -1112,7 +1112,7 @@
dependencies: dependencies:
"@types/react" "*" "@types/react" "*"
"@types/react@*", "@types/react@^16.1.0", "@types/react@^16.7.6": "@types/react@*", "@types/react@16.7.6", "@types/react@^16.1.0", "@types/react@^16.7.6":
version "16.7.6" version "16.7.6"
resolved "https://registry.yarnpkg.com/@types/react/-/react-16.7.6.tgz#80e4bab0d0731ad3ae51f320c4b08bdca5f03040" resolved "https://registry.yarnpkg.com/@types/react/-/react-16.7.6.tgz#80e4bab0d0731ad3ae51f320c4b08bdca5f03040"
integrity sha512-QBUfzftr/8eg/q3ZRgf/GaDP6rTYc7ZNem+g4oZM38C9vXyV8AWRWaTQuW5yCoZTsfHrN7b3DeEiUnqH9SrnpA== integrity sha512-QBUfzftr/8eg/q3ZRgf/GaDP6rTYc7ZNem+g4oZM38C9vXyV8AWRWaTQuW5yCoZTsfHrN7b3DeEiUnqH9SrnpA==
...@@ -3175,7 +3175,7 @@ caniuse-api@^1.5.2: ...@@ -3175,7 +3175,7 @@ caniuse-api@^1.5.2:
lodash.memoize "^4.1.2" lodash.memoize "^4.1.2"
lodash.uniq "^4.5.0" lodash.uniq "^4.5.0"
caniuse-db@^1.0.30000529, caniuse-db@^1.0.30000634, caniuse-db@^1.0.30000639: caniuse-db@1.0.30000772, caniuse-db@^1.0.30000529, caniuse-db@^1.0.30000634, caniuse-db@^1.0.30000639:
version "1.0.30000772" version "1.0.30000772"
resolved "https://registry.yarnpkg.com/caniuse-db/-/caniuse-db-1.0.30000772.tgz#51aae891768286eade4a3d8319ea76d6a01b512b" resolved "https://registry.yarnpkg.com/caniuse-db/-/caniuse-db-1.0.30000772.tgz#51aae891768286eade4a3d8319ea76d6a01b512b"
integrity sha1-UarokXaChureSj2DGep21qAbUSs= integrity sha1-UarokXaChureSj2DGep21qAbUSs=
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment