@dnb/eufemia
Version:
DNB Eufemia Design System UI Library
49 lines (48 loc) • 1.8 kB
TypeScript
import React from 'react';
import type { HelpButtonProps } from './HelpButton';
import type { SpacingProps } from '../../shared/types';
export type HelpProps = {
title?: React.ReactNode;
content?: React.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?: React.RefObject<HTMLButtonElement>;
focusOnOpen?: boolean;
};
declare function HelpButtonInline(props: HelpButtonInlineProps): import("react/jsx-runtime").JSX.Element;
export type HelpButtonInlineContentProps = SpacingProps & {
contentId: string;
className?: string;
element?: React.ElementType;
children?: React.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: React.MemoExoticComponent<typeof HelpButtonInline>;
export default MemoizedHelpButtonInline;
export declare const HelpButtonInlineContent: React.MemoExoticComponent<typeof HelpButtonInlineContentComponent>;