/
githubmirror
/
wp-calypso
Обзор
Документация
Войти
/
githubmirror
/
wp-calypso
Код
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
trunk
client/components/forms/range/docs/example.jsx
30 строк
579 B
Przemek Kuliga
Apply `rules/jsx-boolean-value` eslint rule (#90499)
15 май 2024, 16:13
Не верифицирован
15 май 2024, 16:13
b359eb4
Код
Авторство
О чём код?
import { Gridicon } from '@automattic/components'; import { PureComponent } from 'react'; import FormRange from '../'; export default class extends PureComponent { static displayName = 'Ranges'; state = { rangeValue: 24, }; onChange = ( event ) => { this.setState( { rangeValue: event.target.value, } ); }; render() { return ( <FormRange minContent={ <Gridicon icon="minus-small" /> } maxContent={ <Gridicon icon="plus-small" /> } max="100" value={ this.state.rangeValue } onChange={ this.onChange } showValueLabel /> ); } }