etr2460 commented on a change in pull request #11972:
URL:
https://github.com/apache/incubator-superset/pull/11972#discussion_r543497322
##########
File path: superset-frontend/src/dashboard/components/CodeModal.tsx
##########
@@ -17,24 +17,30 @@
* under the License.
*/
import React from 'react';
-import PropTypes from 'prop-types';
import { t } from '@superset-ui/core';
-import ModalTrigger from '../../components/ModalTrigger';
+import ModalTrigger from 'src/components/ModalTrigger';
-const propTypes = {
- triggerNode: PropTypes.node.isRequired,
- code: PropTypes.string,
- codeCallback: PropTypes.func,
+type CodeModalProps = {
+ triggerNode: JSX.Element;
+ code?: string;
Review comment:
as mentioned here: i think this can be required now:
https://github.com/apache/incubator-superset/pull/11971/files#r540334777
##########
File path: superset-frontend/src/dashboard/components/CodeModal.tsx
##########
@@ -17,24 +17,30 @@
* under the License.
*/
import React from 'react';
-import PropTypes from 'prop-types';
import { t } from '@superset-ui/core';
-import ModalTrigger from '../../components/ModalTrigger';
+import ModalTrigger from 'src/components/ModalTrigger';
-const propTypes = {
- triggerNode: PropTypes.node.isRequired,
- code: PropTypes.string,
- codeCallback: PropTypes.func,
+type CodeModalProps = {
+ triggerNode: JSX.Element;
+ code?: string;
+ codeCallback: () => string;
Review comment:
this doesn't seem to match the type of the default codeCallback prop
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]