import React from 'react' export const InputLabel = React.memo( ({ className = '', label, labelComplement, hasError = false, required = false, htmlFor, }: InputLabelProps) => { if (!label) return null return ( ) } ) export interface InputLabelProps { /** * Custom class name * */ className?: string /** * Label title * */ label?: string /** * Complement to label title * */ labelComplement?: string | React.ReactNode /** Should render error state * @default false * */ hasError?: boolean /** Input is required * @default false * */ required?: boolean /** * Input this label is for * */ htmlFor?: string }