UNPKG

sanity-plugin-mux-input

Version:

An input component that integrates Sanity Studio with Mux video encoding/hosting service.

12 lines (7 loc) 339 B
// Handy little state machine to simplify managing which root level dialog to open import {useState} from 'react' export type DialogState = 'secrets' | 'select-video' | 'edit-thumbnail' | false export function useDialogState() { return useState<DialogState>(false) } export type SetDialogState = ReturnType<typeof useDialogState>[1]