/
githubmirror
/
gutenberg
Обзор
Документация
Войти
/
githubmirror
/
gutenberg
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
trunk
packages/components/src/range-control/input-range.tsx
27 строк
730 B
Marco Ciampini
ESLint: Replace strict config with bulk suppressions (#81248)
07 авг 2026, 14:34
Не верифицирован
07 авг 2026, 14:34
7f43eaf
Код
Авторство
О чём код?
import { forwardRef } from '@wordpress/element'; import { InputRange as BaseInputRange } from './styles/range-control-styles'; import type { InputRangeProps } from './types'; import type { WordPressComponentProps } from '../context'; function InputRange( props: WordPressComponentProps< InputRangeProps, 'input' >, ref: React.ForwardedRef< HTMLInputElement > ) { const { describedBy, label, value, ...otherProps } = props; return ( <BaseInputRange { ...otherProps } aria-describedby={ describedBy } aria-label={ label } aria-hidden={ false } ref={ ref } tabIndex={ 0 } type="range" value={ value } /> ); } const ForwardedComponent = forwardRef( InputRange ); export default ForwardedComponent;