feat: custom collection card template (#433)

This commit is contained in:
Daniel Lautzenheiser
2023-01-25 15:11:59 -05:00
committed by GitHub
parent c6994ea45b
commit 1641630cfd
22 changed files with 1440 additions and 496 deletions

View File

@ -1,20 +1,11 @@
import React from 'react';
import type { ReactNode } from 'react';
import type { InferredField } from '../interface';
export const IDENTIFIER_FIELDS = ['title', 'path'] as const;
export const SORTABLE_FIELDS = ['title', 'date', 'author', 'description'] as const;
export interface InferredField {
type: string;
secondaryTypes: string[];
synonyms: string[];
defaultPreview: (value: string | boolean | number) => JSX.Element | ReactNode;
fallbackToFirstField: boolean;
showError: boolean;
}
export const INFERABLE_FIELDS: Record<string, InferredField> = {
title: {
type: 'string',