import React, { Component } from 'react'; import PropTypes from 'prop-types'; import { IconButton } from 'react-mdl'; import styles from './variant.scss'; import { UPDATE_FEATURE } from '../../../permissions'; class VariantViewComponent extends Component { render() { const { variant, editVariant, removeVariant, hasPermission } = this.props; return ( {variant.name} {variant.weight} {hasPermission(UPDATE_FEATURE) ? ( ) : ( )} ); } } VariantViewComponent.propTypes = { variant: PropTypes.object, removeVariant: PropTypes.func, editVariant: PropTypes.func, hasPermission: PropTypes.func.isRequired, }; export default VariantViewComponent;