import React, { FunctionComponent, ReactNode } from 'react'; import classNames from 'classnames'; import { Tooltip } from '../Tooltip/Tooltip'; interface Props { children: ReactNode; className?: string; htmlFor?: string; isFocused?: boolean; isInvalid?: boolean; tooltip?: string; width?: number; } export const FormLabel: FunctionComponent = ({ children, isFocused, isInvalid, className, htmlFor, tooltip, width, ...rest }) => { const classes = classNames(`gf-form-label width-${width ? width : '10'}`, className, { 'gf-form-label--is-focused': isFocused, 'gf-form-label--is-invalid': isInvalid, }); return ( ); };