@devopness/ui-react
Version:
Devopness Design System React Components - Painless essential DevOps to everyone
32 lines (31 loc) • 766 B
TypeScript
import { default as React } from 'react';
type LabelProps = {
/** Main label text/node */
value: React.ReactNode;
/** Help text shown in tooltip */
helpValue?: string;
/**
* Indicates that the field is optional
* @default false
*/
isOptional?: boolean;
};
/**
* A caption for an item in the UI, usually associated with a form control
*
* @example
* ```jsx
* // Basic label
* <Label value="Username" />
*
* // Label with help text and optional marker
* <Label
* value="Description"
* helpValue="A description of the item"
* isOptional
* />
* ```
*/
declare const Label: ({ value, helpValue, isOptional }: LabelProps) => import("react/jsx-runtime").JSX.Element;
export type { LabelProps };
export { Label };