import * as React from 'react'; import styles from '@patternfly/react-styles/css/components/Form/form'; import { css } from '@patternfly/react-styles'; export interface FormFieldGroupHeaderTitleTextObject { /** Title text. */ text: React.ReactNode; /** The id applied to the title div for accessibility */ id: string; } export interface FormFieldGroupHeaderProps extends React.HTMLProps { /** Additional classes added to the section */ className?: string; /** Field group header title text */ titleText?: FormFieldGroupHeaderTitleTextObject; /** Field group header title description */ titleDescription?: React.ReactNode; /** Field group header actions */ actions?: React.ReactNode; } export const FormFieldGroupHeader: React.FunctionComponent = ({ className, titleText, titleDescription, actions, ...props }: FormFieldGroupHeaderProps) => (
{titleText && (
{titleText.text}
)} {titleDescription &&
{titleDescription}
}
{actions && actions}
); FormFieldGroupHeader.displayName = 'FormFieldGroupHeader';