import React from 'react' import { connect } from 'react-redux' import { removeConstraint } from '../actions/constraints' type ConstraintProps = { children?: React.ReactNode | null className?: string index: number title: string value: number | string unit?: string onRemove: (index: number) => any } const Constraint = ({ children, className, index, title, value, unit, onRemove }: ConstraintProps) => { return (