From 9914ae1b527d176851f5720e5789ef30288bb41e Mon Sep 17 00:00:00 2001 From: Tanmay Laud <31733620+tanmaylaud@users.noreply.github.com> Date: Wed, 29 Jul 2020 00:16:36 +0530 Subject: [PATCH] chore: migrate Checkbox to tsx (#10453) --- .../components/{ChartIcon.jsx => ChartIcon.tsx} | 0 .../src/components/{Checkbox.jsx => Checkbox.tsx} | 14 ++++++-------- .../{CheckboxIcons.jsx => CheckboxIcons.tsx} | 0 3 files changed, 6 insertions(+), 8 deletions(-) rename superset-frontend/src/components/{ChartIcon.jsx => ChartIcon.tsx} (100%) rename superset-frontend/src/components/{Checkbox.jsx => Checkbox.tsx} (82%) rename superset-frontend/src/components/{CheckboxIcons.jsx => CheckboxIcons.tsx} (100%) diff --git a/superset-frontend/src/components/ChartIcon.jsx b/superset-frontend/src/components/ChartIcon.tsx similarity index 100% rename from superset-frontend/src/components/ChartIcon.jsx rename to superset-frontend/src/components/ChartIcon.tsx diff --git a/superset-frontend/src/components/Checkbox.jsx b/superset-frontend/src/components/Checkbox.tsx similarity index 82% rename from superset-frontend/src/components/Checkbox.jsx rename to superset-frontend/src/components/Checkbox.tsx index 72d43848a..a5af5b9b4 100644 --- a/superset-frontend/src/components/Checkbox.jsx +++ b/superset-frontend/src/components/Checkbox.tsx @@ -17,15 +17,14 @@ * under the License. */ import React from 'react'; -import PropTypes from 'prop-types'; -const propTypes = { - checked: PropTypes.bool.isRequired, - onChange: PropTypes.func.isRequired, - style: PropTypes.object, -}; +interface CheckboxProps { + checked: boolean; + onChange: (val?: boolean) => {}; + style: object; +} -export default function Checkbox({ checked, onChange, style }) { +export default function Checkbox({ checked, onChange, style }: CheckboxProps) { return ( ); } -Checkbox.propTypes = propTypes; diff --git a/superset-frontend/src/components/CheckboxIcons.jsx b/superset-frontend/src/components/CheckboxIcons.tsx similarity index 100% rename from superset-frontend/src/components/CheckboxIcons.jsx rename to superset-frontend/src/components/CheckboxIcons.tsx