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 2020/07/15 16:15:04 UTC
[GitHub] [incubator-superset] lilykuang commented on a change in pull request #10298: feat(listviews): SIP-34 Bulk Select
lilykuang commented on a change in pull request #10298:
URL: https://github.com/apache/incubator-superset/pull/10298#discussion_r455169393
##########
File path: superset-frontend/src/components/Button.tsx
##########
@@ -17,41 +17,75 @@
* under the License.
*/
import React from 'react';
-import PropTypes from 'prop-types';
import { kebabCase } from 'lodash';
import {
Button as BootstrapButton,
Tooltip,
OverlayTrigger,
} from 'react-bootstrap';
+import styled from '@superset-ui/style';
-const propTypes = {
- children: PropTypes.node,
- className: PropTypes.string,
- tooltip: PropTypes.node,
- placement: PropTypes.string,
- onClick: PropTypes.func,
- disabled: PropTypes.bool,
- bsSize: PropTypes.string,
- bsStyle: PropTypes.string,
- btnStyles: PropTypes.string,
-};
-const defaultProps = {
- bsSize: 'sm',
- placement: 'top',
-};
+export type OnClickHandler = React.MouseEventHandler<BootstrapButton>;
+
+export interface ButtonProps {
+ className?: string;
+ tooltip?: string;
+ placement?: string;
+ onClick?: OnClickHandler;
+ disabled?: boolean;
+ bsStyle?: string;
+ btnStyles?: string;
+ bsSize?: BootstrapButton.ButtonProps['bsSize'];
+ style?: BootstrapButton.ButtonProps['style'];
+}
const BUTTON_WRAPPER_STYLE = { display: 'inline-block', cursor: 'not-allowed' };
-export default function Button(props) {
- const buttonProps = { ...props };
+const SupersetButton = styled(BootstrapButton)`
Review comment:
yes, they are very similar. They should probably be joined together.
----------------------------------------------------------------
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:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org