@sanity/table
Version:
Table schema type and input component for Sanity Studio
24 lines • 769 B
TypeScript
import { ObjectInputProps, PreviewProps } from "sanity";
interface TableValue {
_type?: 'table';
rows?: TableRow[];
}
type TableProps = ObjectInputProps<TableValue>;
type TableRow = {
_type: string;
_key: string;
cells: string[];
};
declare const TableComponent: (props: TableProps & {
rowType?: string;
}) => import("react").JSX.Element;
interface TablePreviewProps extends PreviewProps {
rows?: TableRow[];
}
declare const TablePreview: (props: TablePreviewProps) => import("react").JSX.Element;
interface TableConfig {
rowType?: string;
}
declare const table: import("sanity").Plugin<void | TableConfig>;
export { TableComponent, TableConfig, TablePreview, type TableProps, type TableRow, type TableValue, table };
//# sourceMappingURL=index.d.ts.map