infinity-ui-elements
Version:
A React TypeScript component library with Tailwind CSS design system
71 lines • 1.81 kB
TypeScript
import * as React from "react";
export interface FormHeaderProps {
/**
* The label text to display
*/
label: string;
/**
* Size variant that affects text size, icon size, and spacing
*/
size?: "small" | "medium" | "large";
/**
* Whether to show "(optional)" text after the label
*/
isOptional?: boolean;
/**
* Whether to show "*" (required indicator) after the label
*/
isRequired?: boolean;
/**
* Tooltip heading text
*/
infoHeading?: string;
/**
* Tooltip description text - if provided, shows the info icon
*/
infoDescription?: string;
/**
* Custom Link component to render on the right side
* If provided, this will be rendered instead of the default Link with linkText
*/
LinkComponent?: React.ReactNode;
/**
* Link text to display on the right side
*/
linkText?: string;
/**
* Link href or onClick handler
*/
linkHref?: string;
/**
* Link click handler
*/
onLinkClick?: (e: React.MouseEvent<HTMLAnchorElement>) => void;
/**
* Leading icon for the link
*/
linkLeadingIcon?: React.ReactNode;
/**
* Trailing icon for the link
*/
linkTrailingIcon?: React.ReactNode;
/**
* HTML for attribute to associate with form input
*/
htmlFor?: string;
/**
* Custom class name for the container
*/
className?: string;
/**
* Custom class name for the label
*/
labelClassName?: string;
/**
* Custom class name for the link
*/
linkClassName?: string;
}
declare const FormHeader: React.ForwardRefExoticComponent<FormHeaderProps & React.RefAttributes<HTMLDivElement>>;
export { FormHeader };
//# sourceMappingURL=FormHeader.d.ts.map