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.

77 lines (76 loc) 1.74 kB
import { ReactNode } from 'react'; export type IBasicUser = { /** * A unique string or guid representing the user */ id: string; /** * The user's email address */ email: string; /** * The user's first / given name */ firstName: string; /** * The user's last / family name */ lastName: string; /** * A URL for an image to use for the user's avatar * NOTE: Avatar is for future use, it is currently ignored in NexusUI components. * @future */ avatar: string; }; export declare enum UploadStatus { /** * File is uploading */ Uploading = "uploading", /** * File upload failed */ Failed = "failed", /** * File upload succeeded */ Succeeded = "succeeded" } export interface IUserInfo extends IBasicUser { /** * The status to display — should be a key of `statusMapping` for components equipped with that prop */ status?: string; /** * Color to use for the background of the user's avatar. */ backgroundColor?: string; /** * Color to use for the text of the user's avatar. */ textColor?: string; /** * Indicates that the user is diabled (this will affect the appearance of the user's avatar). */ disabled?: boolean; /** * An optional test-id to apply to the component representation of the user. */ 'data-testid'?: string; } export interface OptionType { /** * Label to display for the option */ label: string | ReactNode; /** * Option value */ value: string; /** * Whether to disable the option */ disabled?: boolean; [key: string]: any; }