UNPKG

tinacms

Version:

[![GitHub license](https://img.shields.io/github/license/tinacms/tinacms?color=blue)](https://github.com/tinacms/tinacms/blob/main/LICENSE) [![npm version](https://img.shields.io/npm/v/tinacms.svg?style=flat)](https://www.npmjs.com/package/tinacms) [![Bui

35 lines (34 loc) 997 B
import * as React from 'react'; import { Callback, EventBus } from '../core'; export interface SidebarStateOptions { position?: SidebarPosition; buttons?: SidebarButtons; placeholder?: React.FC; defaultWidth?: number; defaultState?: DefaultSidebarState; renderNav?: boolean; } /** * @deprecated * `buttons` set on the form directly * via form config options */ export interface SidebarButtons { save: string; reset: string; } export declare type SidebarPosition = 'displace' | 'overlay'; export declare type DefaultSidebarState = 'open' | 'closed'; export declare class SidebarState { private events; private _isOpen; loadingPlaceholder: React.FC; defaultState: DefaultSidebarState; position: SidebarPosition; renderNav: boolean; buttons: SidebarButtons; constructor(events: EventBus, options?: SidebarStateOptions); get isOpen(): boolean; set isOpen(nextValue: boolean); subscribe(callback: Callback): () => void; }