import React from "react"; import PropTypes from "prop-types"; import Text from "../text"; const Label = (props) => { const { isRequired, error, title, truncate, isInline, htmlFor, text, display, className, id, style, } = props; const errorProp = error ? { color: "#c30" } : {}; return ( {text} {isRequired && " *"} ); }; Label.propTypes = { isRequired: PropTypes.bool, error: PropTypes.bool, isInline: PropTypes.bool, title: PropTypes.string, truncate: PropTypes.bool, htmlFor: PropTypes.string, text: PropTypes.string, display: PropTypes.string, className: PropTypes.string, id: PropTypes.string, style: PropTypes.oneOfType([PropTypes.object, PropTypes.array]), }; Label.defaultProps = { isRequired: false, error: false, isInline: false, truncate: false, }; export default Label;