import PropTypes from 'prop-types'; import React, { Component } from 'react'; import CheckInput from 'Components/Form/CheckInput'; import Icon from 'Components/Icon'; import { icons, kinds } from 'Helpers/Props'; import styles from './OrganizePreviewRow.css'; class OrganizePreviewRow extends Component { // // Lifecycle componentDidMount() { const { id, onSelectedChange } = this.props; onSelectedChange({ id, value: true }); } // // Listeners onSelectedChange = ({ value, shiftKey }) => { const { id, onSelectedChange } = this.props; onSelectedChange({ id, value, shiftKey }); } // // Render render() { const { id, existingPath, newPath, isSelected } = this.props; return (
{existingPath}
{newPath}
); } } OrganizePreviewRow.propTypes = { id: PropTypes.number.isRequired, existingPath: PropTypes.string.isRequired, newPath: PropTypes.string.isRequired, isSelected: PropTypes.bool, onSelectedChange: PropTypes.func.isRequired }; export default OrganizePreviewRow;