/
githubmirror
/
gutenberg
Обзор
Документация
Войти
/
githubmirror
/
gutenberg
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
trunk
packages/components/src/modal/context.ts
9 строк
384 B
Lena Morita
Storybook: Fix missing props on certain components (#75316)
09 фев 2026, 17:01
Не верифицирован
09 фев 2026, 17:01
05718a9
Код
Авторство
О чём код?
import { createContext } from '@wordpress/element'; import type { ModalProps } from './types'; // Used to track and dismiss the prior modal when another opens unless nested. export type Dismissers = Set< React.RefObject< ModalProps[ 'onRequestClose' ] | undefined > >; export const ModalContext = createContext< Dismissers >( new Set() ); ModalContext.displayName = 'ModalContext';