diegomedina248 commented on code in PR #19765:
URL: https://github.com/apache/superset/pull/19765#discussion_r852287150


##########
superset-frontend/src/explore/components/controls/SliderControl.tsx:
##########
@@ -16,21 +16,65 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-import React from 'react';
+import React, { ReactNode } from 'react';
 import Slider from 'src/components/Slider';
 import ControlHeader from 'src/explore/components/ControlHeader';
 
 type SliderControlProps = {
   onChange: (value: number) => void;
   value: number;
   default?: number;
+  name: string;
+  description: string;
+
+  // ControlHeader props
+  label: string;
+  renderTrigger?: boolean;
+  validationErrors?: string[];
+  rightNode?: ReactNode;
+  leftNode?: ReactNode;
+  hovered?: boolean;
+  warning?: string;
+  danger?: string;
+  onClick?: () => void;
+  tooltipOnClick?: () => void;
 };
 
 export default function SliderControl(props: SliderControlProps) {
-  const { onChange = () => {}, default: defaultValue, ...rest } = props;
+  const {

Review Comment:
   Move this to the function declaration please



##########
superset-frontend/src/explore/components/controls/SliderControl.tsx:
##########
@@ -16,21 +16,65 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-import React from 'react';
+import React, { ReactNode } from 'react';
 import Slider from 'src/components/Slider';
 import ControlHeader from 'src/explore/components/ControlHeader';
 
 type SliderControlProps = {
   onChange: (value: number) => void;
   value: number;
   default?: number;
+  name: string;

Review Comment:
   You can use the `ControlHeaderProps` like so:
   ```js
   type SliderControlProps = ControlHeaderProps & {
     onChange: (value: number) => void;
     value: number;
     default?: number;
   };
   ```



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