UNPKG

@dnb/eufemia

Version:

DNB Eufemia Design System UI Library

54 lines (53 loc) 1.6 kB
/** * Web Modal Component * */ import React from 'react'; import ModalContext from '../ModalContext'; import { SectionProps } from '../../Section'; import { ReactChildType } from '../types'; export interface ModalHeaderBarProps extends Omit<SectionProps, 'children'> { /** * The content which will appear when triggering the modal/drawer. */ children?: ReactChildType; /** * Give the inner content wrapper a class name (maps to `dnb-modal__content__inner`). */ className?: string; shadowClass?: string; } interface ModalHeaderBarState { showShadow: boolean; } export default class ModalHeaderBar extends React.PureComponent<ModalHeaderBarProps & Omit<React.HTMLProps<HTMLElement>, 'children'>, ModalHeaderBarState> { static contextType: React.Context<{ preventClick: any; onKeyDownHandler: any; id: any; title: any; hide_close_button: any; close_button_attributes: any; close_title: any; setBackgroundColor: any; onCloseClickHandler: any; contentRef: any; scrollRef: any; hide: any; contentId: any; close: any; }>; context: React.ContextType<typeof ModalContext>; _ref: React.RefObject<any>; intersectionObserver: IntersectionObserver; constructor(props: any); state: { showShadow: boolean; }; componentDidMount(): void; componentDidUpdate(prevProps: any): void; componentWillUnmount(): void; observeHeader(): void; render(): import("react/jsx-runtime").JSX.Element; } export {};