import * as React from 'react' ; interface Props { required : boolean ; symbol ? : React . ReactNode ; } const RequiredSymbol = ( { required , symbol } ) => { if ( required === false ) { return null ; } return < span className = "required-symbol" > { symbol } < /span>; } ; RequiredSymbol . defaultProps = { symbol : ' *' , } ; export default React . memo ( RequiredSymbol ) ;