How to use the rc-slider.propTypes function in rc-slider

To help you get started, we’ve selected a few rc-slider examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github giladv / orkan / src / orkan / controls / slider / index.js View on Github external
import React, {Component} from 'react';
import PropTypes from 'prop-types';
import autobind from 'autobind-decorator';
import OriginalSlider from 'rc-slider';

import {formInput} from '../../form';
import {createStyle} from '../../utils/style-utils';

import 'rc-slider/assets/index.css';
import style from './style';

@autobind
export default class Slider extends Component {
	static propTypes = {
		...OriginalSlider.propTypes
	};

	static defaultProps = {
	};


	render(){
		const {className, error, value, min, ...otherProps} = this.props;

		const s = createStyle(style, className, {
			root: {
				error
			}
		});

		const safeValue = isNaN(value)?0:value;

rc-slider

Slider UI component for React

MIT
Latest version published 1 month ago

Package Health Score

93 / 100
Full package analysis