UNPKG

@nexusui/components

Version:

These are custom components specially-developed for NexusUI applications. They will make your life easier by giving you out-of-the-box implementations for various high-level UI elements that you can drop directly into your application.

92 lines (91 loc) 2.31 kB
import { DialogProps } from '@mui/material/Dialog'; import type { OptionType } from '../models'; /** The props type of [[`IDocumentInfo`]]. */ export type IDocumentInfo = { name: string; project: string; solution: string; }; /** The props type of [[`ICreateDocument`]]. */ export interface ICreateDocument extends DialogProps { /** * Dialog header title. * @default Create Document */ title?: string; /** * Initial document name. * @default Untitled */ initialDocumentName?: string; /** * document name label. * @default Document Name */ documentNameLabel?: string; /** * Project dropdown options. * * ``` *export type OptionType { * label: string; * value: string; * disabled?: boolean; *} * ``` * @default [] */ projectOptions?: ReadonlyArray<OptionType>; /** * The initial selected project id for projectOptions. */ initialProject?: string; /** * Allow enable/disable project selection. * @default false */ disableProject?: boolean; /** * Dialog header title. * @default Connect with Solution */ solutionConnectLabel?: string; /** * Solutions radio select options. * * ``` * export type OptionType = { * label: string; * value: string; * disabled?: boolean; * }; * ``` * @default [] */ solutionOptions?: ReadonlyArray<OptionType>; /** * The initial selected solution id for solutionOptions. */ initialSolution?: string; /** * Callback function triggered by `Create` button click. * * ``` * export type IDocumentInfo = { * name: string; // Document name * project: string; // Project id * solution: string; // Solution id * }; * ``` */ onCreate: (value: IDocumentInfo) => void; /** * Callback function triggered by `Cancel` button click. */ onCancel: () => void; } /** * @param {ICreateDocument} props - provides the properties fo React component * @return {ReactNode} - provides the react component to be ingested **/ export declare const CreateDocument: (props: ICreateDocument) => import("react/jsx-runtime").JSX.Element;