@blocktion/json-to-table
Version:
A powerful, modular React component for converting JSON data to navigable tables with advanced features like automatic column detection, theming, and sub-table navigation. Part of the Blocktion SaaS project ecosystem.
21 lines (20 loc) • 646 B
TypeScript
import React from "react";
import { ValidationRule } from "../../types/editing";
interface ValidationContextType {
rules: ValidationRule[];
validateField: (field: string, value: unknown, row: unknown) => {
isValid: boolean;
error: string | null;
};
validateRow: (row: unknown) => {
isValid: boolean;
errors: Record<string, string>;
};
}
interface ValidationProviderProps {
rules: ValidationRule[];
children: React.ReactNode;
}
export declare const ValidationProvider: React.FC<ValidationProviderProps>;
export declare const useValidationContext: () => ValidationContextType;
export {};