@tinacms/toolkit
Version:
Tina is a lightweight but powerful toolkit for creating a site editing ui with javascript components. Tina surfaces superpowers for dev’s to create, expand on and customize a simple yet intuitive ui for editing content.
28 lines (24 loc) • 649 B
TypeScript
/**
*/
import { FC } from 'react';
import * as React from 'react';
import { Field } from '../../forms';
export interface ToggleProps {
name: string;
input: any;
field: ToggleFieldDefinition;
disabled?: boolean;
onBlur: <T>(_event?: React.FocusEvent<T>) => void;
onChange: <T>(_event: React.ChangeEvent<T> | any) => void;
onFocus: <T>(_event?: React.FocusEvent<T>) => void;
}
interface ToggleFieldDefinition extends Field {
component: 'toggle';
toggleLabels?: boolean | FieldLabels;
}
declare type FieldLabels = {
true: string;
false: string;
};
export declare const Toggle: FC<ToggleProps>;
export {};