You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2022/01/27 20:25:21 UTC

[GitHub] [superset] AAfghahi commented on a change in pull request #18136: refactor: migrate DeleteComponentButton to TypeScript

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



##########
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:
       Is this the function type? Could it not be a () => {} like most functions?




-- 
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-unsubscribe@superset.apache.org

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



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