nytai commented on a change in pull request #10298:
URL: 
https://github.com/apache/incubator-superset/pull/10298#discussion_r454555405



##########
File path: superset-frontend/src/components/Button.tsx
##########
@@ -17,41 +17,70 @@
  * 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)`
+  &.supersetButton {

Review comment:
       This button is used in other areas of the product, so there's potential 
for breakage. Adding the `.supersetButton` class renders the button as a wide 
CTA button (as per the SIP-34 designs). We could abstract this into a prop and 
use that instead, something like `style: 'bootstrap' | 'default' | 'small' | 
'link' | ...` to control these styles, where `bootstrap` defaults to the 
bootstrap styles, and the others pertain to the new styling. 




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

Reply via email to