From ae6bcc41a741489c3a8d66c75e86b90d50516b3a Mon Sep 17 00:00:00 2001 From: Navin Moorthy Date: Fri, 17 Jun 2022 19:06:09 +0530 Subject: [PATCH] =?UTF-8?q?fix(slider):=20=F0=9F=A9=B9=20remove=20visually?= =?UTF-8?q?=20hidden=20in=20input?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/slider/slider-input.tsx | 8 +------- src/slider/slider-thumb.tsx | 7 ++++++- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/src/slider/slider-input.tsx b/src/slider/slider-input.tsx index 7f8a6f702..dde9b8921 100644 --- a/src/slider/slider-input.tsx +++ b/src/slider/slider-input.tsx @@ -1,6 +1,4 @@ -import * as React from "react"; -import { VisuallyHidden } from "ariakit"; -import { useForkRef, useWrapElement } from "ariakit-utils"; +import { useForkRef } from "ariakit-utils"; import { createComponent, createElement, @@ -16,10 +14,6 @@ export const useSliderInput = createHook( props = { ...props, ref: useForkRef(state.inputRef, props.ref) }; props = mergeProps(state.inputProps, props); - props = useWrapElement(props, element => ( - {element} - )); - return props; }, ); diff --git a/src/slider/slider-thumb.tsx b/src/slider/slider-thumb.tsx index 74ef21311..c41cfb98b 100644 --- a/src/slider/slider-thumb.tsx +++ b/src/slider/slider-thumb.tsx @@ -1,4 +1,5 @@ import * as React from "react"; +import { VisuallyHidden } from "ariakit"; import { createComponent, createElement, @@ -12,7 +13,11 @@ import { SliderThumbState } from "./slider-thumb-state"; export const useSliderThumb = createHook( ({ state, ...props }) => { - const children = ; + const children = ( + + + + ); props = { children, ...props }; props = mergeProps(state.thumbProps, props);