@ui5/webcomponents-react
Version:
React Wrapper for UI5 Web Components and additional components
79 lines (78 loc) • 3.09 kB
TypeScript
import '@ui5/webcomponents-fiori/dist/TimelineItem.js';
import type ValueState from '@ui5/webcomponents-base/dist/types/ValueState.js';
import type { CommonProps, Ui5CustomEvent, Ui5DomRef } from '@ui5/webcomponents-react-base';
import type { ReactNode } from 'react';
interface TimelineItemAttributes {
/**
* Defines the icon to be displayed as graphical element within the `TimelineItem`.
* SAP-icons font provides numerous options.
*
* See all the available icons in the [Icon Explorer](https://sdk.openui5.org/test-resources/sap/m/demokit/iconExplorer/webapp/index.html).
* @default undefined
*/
icon?: string | undefined;
/**
* Defines the tooltip of the graphical icon.
*
* **Note:** Available since [v2.22.0](https://github.com/UI5/webcomponents/releases/tag/v2.22.0) of **@ui5/webcomponents-fiori**.
* @default undefined
*/
iconTooltip?: string | undefined;
/**
* Defines the name of the item, displayed before the `title-text`.
* @default undefined
*/
name?: string | undefined;
/**
* Defines if the `name` is clickable.
* @default false
*/
nameClickable?: boolean;
/**
* Defines the state of the icon displayed in the `TimelineItem`.
*
* **Note:** Available since [v2.7.0](https://github.com/UI5/webcomponents/releases/tag/v2.7.0) of **@ui5/webcomponents-fiori**.
* @default "None"
*/
state?: ValueState | keyof typeof ValueState;
/**
* Defines the subtitle text of the component.
* @default undefined
*/
subtitleText?: string | undefined;
/**
* Defines the title text of the component.
* @default undefined
*/
titleText?: string | undefined;
}
interface TimelineItemDomRef extends Required<TimelineItemAttributes>, Ui5DomRef {
}
interface TimelineItemPropTypes extends TimelineItemAttributes, Omit<CommonProps, keyof TimelineItemAttributes | 'children' | 'onNameClick'> {
/**
* Defines the content of the `TimelineItem`.
*
* __Supported Node Type/s:__ `Array<Node>`
*/
children?: ReactNode | ReactNode[];
/**
* Fired when the item name is pressed either with a
* click/tap or by using the Enter or Space key.
*
* **Note:** The event will not be fired if the `name-clickable`
* attribute is not set.
*
* | cancelable | bubbles |
* | :--------: | :-----: |
* | ❌|✅|
*/
onNameClick?: (event: Ui5CustomEvent<TimelineItemDomRef>) => void;
}
/**
* An entry posted on the timeline.
*
* __Note:__ This is a UI5 Web Component! [TimelineItem UI5 Web Component Documentation](https://ui5.github.io/webcomponents/components/fiori/TimelineItem) | [Repository](https://github.com/UI5/webcomponents)
*/
declare const TimelineItem: import("react").ForwardRefExoticComponent<TimelineItemPropTypes & import("@ui5/webcomponents-react-base").WithWebComponentPropTypes & import("react").RefAttributes<TimelineItemDomRef>>;
export { TimelineItem };
export type { TimelineItemDomRef, TimelineItemPropTypes };