@carbon/ibm-products
Version:
Carbon for IBM Products
48 lines (47 loc) • 1.86 kB
TypeScript
/**
* Copyright IBM Corp. 2023, 2024
*
* 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, { ReactNode } from 'react';
export interface CoachmarkFixedProps {
/**
* CoachmarkFixed should use a single CoachmarkOverlayElements component as a child.
*/
children: ReactNode;
/**
* Optional class name for this component.
*/
className?: string;
/**
* Function to call when the Coachmark closes.
*/
onClose?: () => void;
/**
* By default, the Coachmark will be appended to the end of `document.body`.
* The Coachmark will remain persistent as the user navigates the app until
* the user closes the Coachmark.
*
* Alternatively, the app developer can tightly couple the Coachmark to a DOM
* element or other component by specifying a CSS selector. The Coachmark will
* remain visible as long as that element remains visible or mounted. When the
* element is hidden or component is unmounted, the Coachmark will disappear.
*/
portalTarget?: string;
/**
* The tagline title which will be fixed to the bottom right of the window and will serve as the display trigger.
*/
tagline: string;
/**
* Determines the theme of the component.
*/
theme?: 'light' | 'dark';
}
/**
* Fixed coachmarks are used to call out specific functionality or concepts
* within the UI that may not be intuitive but are important for the
* user to gain understanding of the product's main value and discover new use cases.
* This variant allows the a coachmark overlay to be displayed by interacting with the tagline.
*/
export declare let CoachmarkFixed: React.ForwardRefExoticComponent<CoachmarkFixedProps & React.RefAttributes<HTMLDivElement>>;