AAfghahi commented on a change in pull request #18136:
URL: https://github.com/apache/superset/pull/18136#discussion_r794999134



##########
File path: superset-frontend/src/dashboard/components/DeleteComponentButton.tsx
##########
@@ -16,25 +16,21 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-import React from 'react';
-import PropTypes from 'prop-types';
+import React, { MouseEventHandler } from 'react';
 import Icons from 'src/components/Icons';
 import IconButton from './IconButton';
 
-const propTypes = {
-  onDelete: PropTypes.func.isRequired,
+type DeleteComponentButtonProps = {
+  onDelete: MouseEventHandler<HTMLDivElement>;
 };
 
-const defaultProps = {};
-
-export default class DeleteComponentButton extends React.PureComponent {
+class DeleteComponentButton extends 
React.PureComponent<DeleteComponentButtonProps> {
   render() {
-    const { onDelete } = this.props;
+    const { onDelete = () => {} } = this.props;

Review comment:
       I don;'t think you need to change it here. 

##########
File path: superset-frontend/src/dashboard/components/DeleteComponentButton.tsx
##########
@@ -16,25 +16,21 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-import React from 'react';
-import PropTypes from 'prop-types';
+import React, { MouseEventHandler } from 'react';
 import Icons from 'src/components/Icons';
 import IconButton from './IconButton';
 
-const propTypes = {
-  onDelete: PropTypes.func.isRequired,
+type DeleteComponentButtonProps = {
+  onDelete: MouseEventHandler<HTMLDivElement>;

Review comment:
       Ok, if it is the same then that is fine. I just wanted to amek sure. 




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org
For additional commands, e-mail: notifications-h...@superset.apache.org

Reply via email to