@ui5/webcomponents-react
Version:
React Wrapper for UI5 Web Components and additional components
121 lines (120 loc) • 9.43 kB
TypeScript
import '@ui5/webcomponents-fiori/dist/DynamicPageTitle.js';
import type { ReactNode } from 'react';
import type { CommonProps, Ui5DomRef, UI5WCSlotsNode } from '../../types/index.js';
interface DynamicPageTitleAttributes {
}
interface DynamicPageTitleDomRef extends Required<DynamicPageTitleAttributes>, Ui5DomRef {
}
interface DynamicPageTitlePropTypes extends DynamicPageTitleAttributes, Omit<CommonProps, 'actionsBar' | 'breadcrumbs' | 'children' | 'heading' | 'navigationBar' | 'snappedHeading' | 'snappedSubheading' | 'subheading'> {
/**
* Defines the bar with actions in the Dynamic page title.
*
* __Note:__ The content of the prop will be rendered into a [<slot>](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/slot) by assigning the respective [slot](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/slot) attribute (`slot="actionsBar"`).
* Since you can't change the DOM order of slots when declaring them within a prop, it might prove beneficial to manually mount them as part of the component's children, especially when facing problems with the reading order of screen readers.
*
* __Note:__ When passing a custom React component to this prop, you have to make sure your component reads the `slot` prop and appends it to the most outer element of your component.
* Learn more about it [here](https://sap.github.io/ui5-webcomponents-react/v2/?path=/docs/knowledge-base-handling-slots--docs).
*/
actionsBar?: UI5WCSlotsNode;
/**
* Defines the content of the breadcrumbs inside Dynamic Page Title.
*
* __Note:__ The content of the prop will be rendered into a [<slot>](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/slot) by assigning the respective [slot](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/slot) attribute (`slot="breadcrumbs"`).
* Since you can't change the DOM order of slots when declaring them within a prop, it might prove beneficial to manually mount them as part of the component's children, especially when facing problems with the reading order of screen readers.
*
* __Note:__ When passing a custom React component to this prop, you have to make sure your component reads the `slot` prop and appends it to the most outer element of your component.
* Learn more about it [here](https://sap.github.io/ui5-webcomponents-react/v2/?path=/docs/knowledge-base-handling-slots--docs).
*/
breadcrumbs?: UI5WCSlotsNode;
/**
* Defines the content of the Dynamic page title.
*/
children?: ReactNode | ReactNode[];
/**
* Defines the content of the Heading of the Dynamic Page.
*
* The font size of the title within the `heading` slot can be adjusted to the recommended values using the following CSS variables:
*
* **Expanded:** `var(--sapObjectHeader_Title_FontSize)`
*
* **Collapsed:** `var(--sapObjectHeader_Title_SnappedFontSize)`
*
* __Note:__ The content of the prop will be rendered into a [<slot>](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/slot) by assigning the respective [slot](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/slot) attribute (`slot="heading"`).
* Since you can't change the DOM order of slots when declaring them within a prop, it might prove beneficial to manually mount them as part of the component's children, especially when facing problems with the reading order of screen readers.
*
* __Note:__ When passing a custom React component to this prop, you have to make sure your component reads the `slot` prop and appends it to the most outer element of your component.
* Learn more about it [here](https://sap.github.io/ui5-webcomponents-react/v2/?path=/docs/knowledge-base-handling-slots--docs).
*/
heading?: UI5WCSlotsNode;
/**
* Defines the bar with navigation actions in the Dynamic page title.
*
* __Note:__ The content of the prop will be rendered into a [<slot>](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/slot) by assigning the respective [slot](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/slot) attribute (`slot="navigationBar"`).
* Since you can't change the DOM order of slots when declaring them within a prop, it might prove beneficial to manually mount them as part of the component's children, especially when facing problems with the reading order of screen readers.
*
* __Note:__ When passing a custom React component to this prop, you have to make sure your component reads the `slot` prop and appends it to the most outer element of your component.
* Learn more about it [here](https://sap.github.io/ui5-webcomponents-react/v2/?path=/docs/knowledge-base-handling-slots--docs).
*/
navigationBar?: UI5WCSlotsNode;
/**
* Defines the heading that is shown only when the header is snapped.
*
* __Note:__ The content of the prop will be rendered into a [<slot>](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/slot) by assigning the respective [slot](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/slot) attribute (`slot="snappedHeading"`).
* Since you can't change the DOM order of slots when declaring them within a prop, it might prove beneficial to manually mount them as part of the component's children, especially when facing problems with the reading order of screen readers.
*
* __Note:__ When passing a custom React component to this prop, you have to make sure your component reads the `slot` prop and appends it to the most outer element of your component.
* Learn more about it [here](https://sap.github.io/ui5-webcomponents-react/v2/?path=/docs/knowledge-base-handling-slots--docs).
*/
snappedHeading?: UI5WCSlotsNode;
/**
* Defines the content of the title that is shown only when the header is snapped.
*
* __Note:__ The content of the prop will be rendered into a [<slot>](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/slot) by assigning the respective [slot](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/slot) attribute (`slot="snappedSubheading"`).
* Since you can't change the DOM order of slots when declaring them within a prop, it might prove beneficial to manually mount them as part of the component's children, especially when facing problems with the reading order of screen readers.
*
* __Note:__ When passing a custom React component to this prop, you have to make sure your component reads the `slot` prop and appends it to the most outer element of your component.
* Learn more about it [here](https://sap.github.io/ui5-webcomponents-react/v2/?path=/docs/knowledge-base-handling-slots--docs).
*/
snappedSubheading?: UI5WCSlotsNode;
/**
* Defines the content of the title that is shown only when the header is not snapped.
*
* __Note:__ The content of the prop will be rendered into a [<slot>](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/slot) by assigning the respective [slot](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/slot) attribute (`slot="subheading"`).
* Since you can't change the DOM order of slots when declaring them within a prop, it might prove beneficial to manually mount them as part of the component's children, especially when facing problems with the reading order of screen readers.
*
* __Note:__ When passing a custom React component to this prop, you have to make sure your component reads the `slot` prop and appends it to the most outer element of your component.
* Learn more about it [here](https://sap.github.io/ui5-webcomponents-react/v2/?path=/docs/knowledge-base-handling-slots--docs).
*/
subheading?: UI5WCSlotsNode;
}
/**
* Title of the `DynamicPage`.
*
* The `DynamicPageTitle` component is part of the `DynamicPage`
* family and is used to serve as title of the `DynamicPage`.
*
* ### Usage
*
* The `DynamicPageTitle` can hold any component and displays the most important
* information regarding the object that will always remain visible while scrolling.
*
* **Note:** The `actions` slot accepts any UI5 web component, but it's
* recommended to use `ui5-toolbar`.
*
* The user can switch between the expanded/collapsed states of the
* `DynamicPage` by clicking on the `DynamicPageTitle`
* or by using the expand/collapse visual indicators, positioned at the bottom of the
* `DynamicPageTitle` and the `DynamicPageHeader` inside `ui5-dynamic-page-header-actions`.
*
* ### Responsive Behavior
*
* The responsive behavior of the `DynamicPageTitle` depends on the behavior of the
* content that is displayed.
*
* __Note__: This is a UI5 Web Component! [Repository](https://github.com/SAP/ui5-webcomponents) | [Documentation](https://sap.github.io/ui5-webcomponents/)
*
* @since [2.0.0](https://github.com/SAP/ui5-webcomponents/releases/tag/v2.0.0) of __@ui5/webcomponents-fiori__.
*/
declare const DynamicPageTitle: import("react").ForwardRefExoticComponent<DynamicPageTitlePropTypes & import("../../internal/withWebComponent.js").WithWebComponentPropTypes & import("react").RefAttributes<DynamicPageTitleDomRef>>;
export { DynamicPageTitle };
export type { DynamicPageTitleDomRef, DynamicPageTitlePropTypes };