From 30a55d0ac3384ceae7c44f6c4356dac5658007f0 Mon Sep 17 00:00:00 2001 From: Andrew Watkins Date: Mon, 16 Jul 2018 09:58:54 -0700 Subject: [PATCH] Convert LayoutCellHeader to TS --- ...LayoutCellHeader.js => LayoutCellHeader.tsx} | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) rename ui/src/shared/components/{LayoutCellHeader.js => LayoutCellHeader.tsx} (69%) diff --git a/ui/src/shared/components/LayoutCellHeader.js b/ui/src/shared/components/LayoutCellHeader.tsx similarity index 69% rename from ui/src/shared/components/LayoutCellHeader.js rename to ui/src/shared/components/LayoutCellHeader.tsx index 668cc19f0..4192d982f 100644 --- a/ui/src/shared/components/LayoutCellHeader.js +++ b/ui/src/shared/components/LayoutCellHeader.tsx @@ -1,8 +1,12 @@ -import React from 'react' -import PropTypes from 'prop-types' +import React, {SFC} from 'react' import {isCellUntitled} from 'src/dashboards/utils/cellGetters' -const LayoutCellHeader = ({isEditable, cellName}) => { +interface Props { + isEditable: boolean + cellName: string +} + +const LayoutCellHeader: SFC = ({isEditable, cellName}) => { const headingClass = `dash-graph--heading ${ isEditable ? 'dash-graph--draggable dash-graph--heading-draggable' : '' }` @@ -22,11 +26,4 @@ const LayoutCellHeader = ({isEditable, cellName}) => { ) } -const {bool, string} = PropTypes - -LayoutCellHeader.propTypes = { - isEditable: bool, - cellName: string, -} - export default LayoutCellHeader