payose commented on code in PR #32980:
URL: https://github.com/apache/superset/pull/32980#discussion_r2029912619


##########
superset-frontend/src/components/Checkbox/Checkbox.tsx:
##########
@@ -16,43 +16,29 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-import { CSSProperties } from 'react';
-import { styled } from '@superset-ui/core';
-import { CheckboxChecked, CheckboxUnchecked } from 'src/components/Checkbox';
+import { Checkbox as AntCheckbox } from 'antd-v5';
+import { ReactNode } from 'react';
 
 export interface CheckboxProps {
   checked: boolean;
   onChange: (val?: boolean) => void;
-  style?: CSSProperties;
-  className?: string;
+  disabled?: boolean;
+  children?: ReactNode;
 }
 
-const Styles = styled.span`
-  &,
-  & svg {
-    vertical-align: top;
-  }
-`;
-
 export default function Checkbox({
   checked,
   onChange,
-  style,
-  className,
+  disabled,
+  children,
 }: CheckboxProps) {
   return (
-    <Styles
-      style={style}
-      onClick={() => {
-        onChange(!checked);
-      }}
-      role="checkbox"
-      tabIndex={0}
-      aria-checked={checked}
-      aria-label="Checkbox"
-      className={className || ''}
+    <AntCheckbox
+      checked={checked}
+      onChange={e => onChange(e.target.checked)}
+      disabled={disabled}

Review Comment:
   Thanks for pointing this out. I agree.



-- 
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: [email protected]

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