@ui5/webcomponents-react
Version:
React Wrapper for UI5 Web Components and additional components
75 lines (74 loc) • 4.35 kB
TypeScript
import '@ui5/webcomponents-fiori/dist/NavigationLayout.js';
import type NavigationLayoutMode from '@ui5/webcomponents-fiori/dist/types/NavigationLayoutMode.js';
import type { CommonProps, Ui5DomRef, UI5WCSlotsNode } from '@ui5/webcomponents-react-base';
import type { ReactNode } from 'react';
interface NavigationLayoutAttributes {
/**
* Specifies the navigation layout mode.
* @default "Auto"
*/
mode?: NavigationLayoutMode | keyof typeof NavigationLayoutMode;
}
interface NavigationLayoutDomRef extends Required<NavigationLayoutAttributes>, Ui5DomRef {
/**
* Gets whether the side navigation is collapsed.
* @returns {boolean}
*/
isSideCollapsed: () => boolean;
}
interface NavigationLayoutPropTypes extends NavigationLayoutAttributes, Omit<CommonProps, keyof NavigationLayoutAttributes | 'children' | 'header' | 'sideContent'> {
/**
* Defines the content.
*
* __Supported Node Type/s:__ `Array<HTMLElement>`
*/
children?: ReactNode | ReactNode[];
/**
* Defines the header.
*
* __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="header"`).
* 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://ui5.github.io/webcomponents-react/v2/?path=/docs/knowledge-base-handling-slots--docs).
*
* __Supported Node Type/s:__ `Array<HTMLElement>`
*/
header?: UI5WCSlotsNode;
/**
* Defines the side content.
*
* __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="sideContent"`).
* 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://ui5.github.io/webcomponents-react/v2/?path=/docs/knowledge-base-handling-slots--docs).
*
* __Supported Node Type/s:__ `Array<SideNavigation>`
*/
sideContent?: UI5WCSlotsNode;
}
/**
* The `NavigationLayout` is a container component that can be used to
* create a layout with a header, a side navigation and a content area.
*
* ### Usage
*
* Use the `NavigationLayout` to create whole screen of an application with vertical navigation.
*
* ### Responsive Behavior
*
* On larger screens with a width of 600px or more, excluding mobile phone devices, the side navigation is visible
* by default and can be expanded or collapsed using the `mode` property.
* On mobile phone devices and screens with a width of 599px or less, the side navigation is hidden by
* default and can be displayed using the `mode` property.
*
*
*
* __Note:__ This is a UI5 Web Component! [NavigationLayout UI5 Web Component Documentation](https://ui5.github.io/webcomponents/components/fiori/NavigationLayout) | [Repository](https://github.com/UI5/webcomponents)
*
* @since [2.4.0](https://github.com/UI5/webcomponents/releases/tag/v2.4.0) of __@ui5/webcomponents-fiori__.
*/
declare const NavigationLayout: import("react").ForwardRefExoticComponent<NavigationLayoutPropTypes & import("@ui5/webcomponents-react-base").WithWebComponentPropTypes & import("react").RefAttributes<NavigationLayoutDomRef>>;
export { NavigationLayout };
export type { NavigationLayoutDomRef, NavigationLayoutPropTypes };