import PropTypes from 'prop-types'; import React, { Component } from 'react'; import NumberInput from 'Components/Form/NumberInput'; import styles from './QualityProfileFormatItem.css'; class QualityProfileFormatItem extends Component { // // Listeners onScoreChange = ({ value }) => { const { formatId } = this.props; this.props.onScoreChange(formatId, value); }; // // Render render() { const { name, score } = this.props; return (
); } } QualityProfileFormatItem.propTypes = { formatId: PropTypes.number.isRequired, name: PropTypes.string.isRequired, score: PropTypes.number.isRequired, onScoreChange: PropTypes.func }; QualityProfileFormatItem.defaultProps = { // To handle the case score is deleted during edit score: 0 }; export default QualityProfileFormatItem;