UNPKG

@dnb/eufemia

Version:

DNB Eufemia Design System UI Library

49 lines (48 loc) 1.83 kB
import type { ElementType, ReactNode, RefObject } from 'react'; import type { HelpButtonProps } from './HelpButton'; import type { SpacingProps } from '../../shared/types'; export type HelpProps = { title?: ReactNode; content?: ReactNode; renderAs?: 'inline' | 'dialog'; /** Only for the "inline" variant */ open?: boolean; /** Only for the "inline" variant */ breakout?: boolean; /** Only for the "inline" variant */ outset?: boolean; /** * If set to `true`, no open/close animation will be shown when renderAs="dialog". Defaults to `false`. */ noAnimation?: boolean; }; export type HelpButtonInlineProps = HelpButtonProps & { contentId?: string; help?: HelpProps; /** * If set to `true`, the content will get focus when the help content is opened. */ focusOnOpen?: boolean; }; export type HelpButtonInlineSharedStateDataProps = { isOpen: boolean; isUserIntent?: boolean; buttonRef?: RefObject<HTMLButtonElement>; focusOnOpen?: boolean; }; declare function HelpButtonInline(props: HelpButtonInlineProps): import("react/jsx-runtime").JSX.Element; export type HelpButtonInlineContentProps = SpacingProps & { contentId: string; className?: string; element?: ElementType; children?: ReactNode; help?: HelpProps; breakout?: boolean; outset?: boolean; roundedCorner?: boolean; focusOnOpen?: boolean; }; declare function HelpButtonInlineContentComponent(props: HelpButtonInlineContentProps): import("react/jsx-runtime").JSX.Element; declare const MemoizedHelpButtonInline: import("react").MemoExoticComponent<typeof HelpButtonInline>; export default MemoizedHelpButtonInline; export declare const HelpButtonInlineContent: import("react").MemoExoticComponent<typeof HelpButtonInlineContentComponent>;