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



##########
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:
       Yes, that is a function type. @AAfghahi 
   Of course it can be changed to `() => {}`.
   I recommend keeping it for the type safety since it's used on the `onClick` 
event.
   Do you still want me to change it?
   
![image](https://user-images.githubusercontent.com/37535505/151516729-7f882af0-b104-45f4-b582-75c7538b7644.png)
   




-- 
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