@ozen-ui/kit
Version:
React component library
13 lines (12 loc) • 563 B
JavaScript
import { createContext, useContext } from 'react';
import { isDev } from '../../constants/environment';
import { SECTION_MESSAGE_DEFAULT_SIZE } from './constants';
export var SectionMessageContextDefaultValue = {
size: SECTION_MESSAGE_DEFAULT_SIZE,
};
export var SectionMessageContext = createContext(SectionMessageContextDefaultValue);
export var useSectionMessageContext = function () { return useContext(SectionMessageContext); };
// Именованный провайдер
if (isDev) {
SectionMessageContext.displayName = 'SectionMessageContext';
}