react-vite-themes
Version:
A test/experimental React theme system created for learning purposes. Features atomic design components, SCSS variables, and dark/light theme support. Not intended for production use.
13 lines (12 loc) • 379 B
JavaScript
import { createContext, useContext } from 'react';
// Create form context
const FormContext = createContext(null);
// Hook to use form context
export const useFormContext = () => {
const context = useContext(FormContext);
if (!context) {
throw new Error('useFormContext must be used within a Form component');
}
return context;
};
export { FormContext };