@carbon/react
Version:
React components for the Carbon Design System
279 lines (278 loc) • 9.31 kB
TypeScript
/**
* Copyright IBM Corp. 2025
*
* This source code is licensed under the Apache-2.0 license found in the
* LICENSE file in the root directory of this source tree.
*/
import React, { type ComponentType, type FunctionComponent } from 'react';
import PropTypes from 'prop-types';
import { TYPES } from '../Tag/Tag';
/**
* ----------
* PageHeader
* ----------
*/
interface PageHeaderProps {
children?: React.ReactNode;
className?: string;
}
declare const PageHeader: React.ForwardRefExoticComponent<PageHeaderProps & React.RefAttributes<HTMLDivElement>>;
/**
* -----------------------
* PageHeaderBreadcrumbBar
* -----------------------
*/
interface PageHeaderBreadcrumbBarProps {
/**
* `true` by default to render BreadcrumbBar bottom border.
*/
border?: Boolean;
children?: React.ReactNode;
className?: string;
/**
* Provide an optional icon to render in front of the PageHeaderContent's title.
*/
renderIcon?: ComponentType | FunctionComponent;
/**
* The PageHeaderBreadcrumbBar's content actions
*/
contentActions?: React.ReactNode;
/**
* `true` to set content actions flush against page actions
*/
contentActionsFlush?: Boolean;
/**
* The PageHeaderContent's page actions
*/
pageActions?: React.ReactNode;
/**
* `true` to set page actions flush with page
*/
pageActionsFlush?: Boolean;
}
declare const PageHeaderBreadcrumbBar: React.ForwardRefExoticComponent<PageHeaderBreadcrumbBarProps & React.RefAttributes<HTMLDivElement>>;
/**
* -----------------
* PageHeaderContent
* -----------------
*/
interface PageHeaderContentProps {
/**
* Provide child elements to be rendered inside PageHeaderContent.
*/
children?: React.ReactNode;
/**
* Specify an optional className to be added to your PageHeaderContent
*/
className?: string;
/**
* Provide an optional icon to render in front of the PageHeaderContent's title.
*/
renderIcon?: ComponentType | FunctionComponent;
/**
* The PageHeaderContent's title
*/
title: string;
/**
* The PageHeaderContent's contextual actions
*/
contextualActions?: React.ReactNode;
/**
* The PageHeaderContent's page actions
*/
pageActions?: React.ReactNode;
}
declare const PageHeaderContent: React.ForwardRefExoticComponent<PageHeaderContentProps & React.RefAttributes<HTMLDivElement>>;
/**
* ----------------
* PageHeaderContentPageActions
* ----------------
*/
interface PageHeaderContentPageActionsProps {
/**
* Provide child elements to be rendered inside PageHeaderContentPageActions.
*/
children?: React.ReactNode;
/**
* Specify an optional className to be added to your PageHeaderContentPageActions
*/
className?: string;
/**
* The PageHeaderContent's page actions collapsible Menu button label
*/
menuButtonLabel?: string;
/**
* The PageHeaderContent's page actions
*/
actions?: React.ReactNode;
}
declare const PageHeaderContentPageActions: {
({ className, children, menuButtonLabel, actions, ...other }: PageHeaderContentPageActionsProps): import("react/jsx-runtime").JSX.Element;
displayName: string;
propTypes: {
/**
* Provide child elements to be rendered inside PageHeaderContentPageActions.
*/
children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
/**
* Specify an optional className to be added to your PageHeaderContentPageActions
*/
className: PropTypes.Requireable<string>;
/**
* The PageHeaderContent's collapsible Menu button label
*/
menuButtonLabel: PropTypes.Requireable<string>;
/**
* The PageHeaderContent's page actions
*/
actions: PropTypes.Requireable<NonNullable<any[] | PropTypes.ReactNodeLike>>;
};
};
/**
* ----------------
* PageHeaderContentText
* ----------------
*/
interface PageHeaderContentTextProps {
/**
* Provide child elements to be rendered inside PageHeaderContentText.
*/
children?: React.ReactNode;
/**
* Specify an optional className to be added to your PageHeaderContentText
*/
className?: string;
/**
* The PageHeaderContent's subtitle
*/
subtitle?: string;
}
declare const PageHeaderContentText: {
({ className, children, subtitle, ...other }: PageHeaderContentTextProps): import("react/jsx-runtime").JSX.Element;
displayName: string;
propTypes: {
/**
* Provide child elements to be rendered inside PageHeaderContentText.
*/
children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
/**
* Specify an optional className to be added to your PageHeaderContentText
*/
className: PropTypes.Requireable<string>;
/**
* The PageHeaderContent's subtitle
*/
subtitle: PropTypes.Requireable<string>;
};
};
/**
* ----------------
* PageHeaderHeroImage
* ----------------
*/
interface PageHeaderHeroImageProps {
/**
* Provide child elements to be rendered inside PageHeaderHeroImage.
*/
children?: React.ReactNode;
/**
* Specify an optional className to be added to your PageHeaderHeroImage
*/
className?: string;
}
declare const PageHeaderHeroImage: {
({ className, children, ...other }: PageHeaderHeroImageProps): import("react/jsx-runtime").JSX.Element;
displayName: string;
propTypes: {
/**
* Provide child elements to be rendered inside PageHeaderHeroImage.
*/
children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
/**
* Specify an optional className to be added to your PageHeaderHeroImage
*/
className: PropTypes.Requireable<string>;
};
};
/**
* ----------------
* PageHeaderTabBar
* ----------------
*/
interface TagItem {
type: keyof typeof TYPES;
text: string;
size?: 'sm' | 'md' | 'lg';
id: string;
}
interface PageHeaderTabBarProps {
children?: React.ReactNode;
className?: string;
tags?: TagItem[];
}
declare const PageHeaderTabBar: React.ForwardRefExoticComponent<PageHeaderTabBarProps & React.RefAttributes<HTMLDivElement>>;
/**
* -------
* Exports
* -------
*/
declare const Root: React.ForwardRefExoticComponent<PageHeaderProps & React.RefAttributes<HTMLDivElement>>;
declare const BreadcrumbBar: React.ForwardRefExoticComponent<PageHeaderBreadcrumbBarProps & React.RefAttributes<HTMLDivElement>>;
declare const Content: React.ForwardRefExoticComponent<PageHeaderContentProps & React.RefAttributes<HTMLDivElement>>;
declare const ContentPageActions: {
({ className, children, menuButtonLabel, actions, ...other }: PageHeaderContentPageActionsProps): import("react/jsx-runtime").JSX.Element;
displayName: string;
propTypes: {
/**
* Provide child elements to be rendered inside PageHeaderContentPageActions.
*/
children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
/**
* Specify an optional className to be added to your PageHeaderContentPageActions
*/
className: PropTypes.Requireable<string>;
/**
* The PageHeaderContent's collapsible Menu button label
*/
menuButtonLabel: PropTypes.Requireable<string>;
/**
* The PageHeaderContent's page actions
*/
actions: PropTypes.Requireable<NonNullable<any[] | PropTypes.ReactNodeLike>>;
};
};
declare const ContentText: {
({ className, children, subtitle, ...other }: PageHeaderContentTextProps): import("react/jsx-runtime").JSX.Element;
displayName: string;
propTypes: {
/**
* Provide child elements to be rendered inside PageHeaderContentText.
*/
children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
/**
* Specify an optional className to be added to your PageHeaderContentText
*/
className: PropTypes.Requireable<string>;
/**
* The PageHeaderContent's subtitle
*/
subtitle: PropTypes.Requireable<string>;
};
};
declare const HeroImage: {
({ className, children, ...other }: PageHeaderHeroImageProps): import("react/jsx-runtime").JSX.Element;
displayName: string;
propTypes: {
/**
* Provide child elements to be rendered inside PageHeaderHeroImage.
*/
children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
/**
* Specify an optional className to be added to your PageHeaderHeroImage
*/
className: PropTypes.Requireable<string>;
};
};
declare const TabBar: React.ForwardRefExoticComponent<PageHeaderTabBarProps & React.RefAttributes<HTMLDivElement>>;
export { PageHeader, PageHeaderBreadcrumbBar, PageHeaderContent, PageHeaderContentPageActions, PageHeaderContentText, PageHeaderHeroImage, PageHeaderTabBar, Root, BreadcrumbBar, Content, ContentPageActions, ContentText, HeroImage, TabBar, };
export type { PageHeaderProps, PageHeaderBreadcrumbBarProps, PageHeaderContentProps, PageHeaderContentPageActionsProps, PageHeaderContentTextProps, PageHeaderHeroImageProps, PageHeaderTabBarProps, };