@@ -14,9 +17,4 @@ const SplashPage = ({children}) => (
)
-const {node} = PropTypes
-SplashPage.propTypes = {
- children: node,
-}
-
export default SplashPage
diff --git a/ui/src/shared/components/Tooltip.js b/ui/src/shared/components/Tooltip.tsx
similarity index 55%
rename from ui/src/shared/components/Tooltip.js
rename to ui/src/shared/components/Tooltip.tsx
index 37fb9c8bec..bfdb70db3b 100644
--- a/ui/src/shared/components/Tooltip.js
+++ b/ui/src/shared/components/Tooltip.tsx
@@ -1,8 +1,11 @@
-import React from 'react'
-import PropTypes from 'prop-types'
+import React, {SFC, ReactElement} from 'react'
import ReactTooltip from 'react-tooltip'
-const Tooltip = ({tip, children}) => (
+interface Props {
+ tip: string
+ children: ReactElement
+}
+const Tooltip: SFC = ({tip, children}) => (
)
-const {shape, string} = PropTypes
-
-Tooltip.propTypes = {
- tip: string,
- children: shape({}),
-}
-
export default Tooltip
diff --git a/ui/src/shared/components/WidgetCell.js b/ui/src/shared/components/WidgetCell.tsx
similarity index 72%
rename from ui/src/shared/components/WidgetCell.js
rename to ui/src/shared/components/WidgetCell.tsx
index c2930f6a62..5dd8d78ef1 100644
--- a/ui/src/shared/components/WidgetCell.js
+++ b/ui/src/shared/components/WidgetCell.tsx
@@ -1,13 +1,25 @@
-import React from 'react'
-import PropTypes from 'prop-types'
+import React, {SFC} from 'react'
import AlertsApp from 'src/alerts/containers/AlertsApp'
import NewsFeed from 'src/status/components/NewsFeed'
import GettingStarted from 'src/status/components/GettingStarted'
+import {Cell} from 'src/types/dashboard'
+import {Source} from 'src/types/sources'
import {RECENT_ALERTS_LIMIT} from 'src/status/constants'
-const WidgetCell = ({cell, source, timeRange}) => {
+interface TimeRange {
+ lower: string
+ upper: string
+}
+
+interface Props {
+ timeRange: TimeRange
+ cell: Cell
+ source: Source
+}
+
+const WidgetCell: SFC = ({cell, source, timeRange}) => {
switch (cell.type) {
case 'alerts': {
return (
@@ -35,15 +47,4 @@ const WidgetCell = ({cell, source, timeRange}) => {
}
}
-const {shape, string} = PropTypes
-
-WidgetCell.propTypes = {
- timeRange: shape({
- lower: string,
- upper: string,
- }),
- source: shape({}),
- cell: shape({}),
-}
-
export default WidgetCell