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.

60 lines (59 loc) 1.76 kB
import * as React from 'react'; import { StackProps } from '@mui/material/Stack'; import { IShareUser, IShareConfig } from '../../model'; export type IAccessManager = { /** * List of users with whom the item has been shared. * *``` * export type IShareUser = { * id: string; * firstName: string; * lastName: string; * email: string; * avatar: string; * backgroundColor?: string; * textColor?: string; * disabled?: boolean; * permissionLevels?: IPermissionLevel[]; * permissionLevel?: string; * permissionEditable?: boolean; * }; * ``` * * @default [] */ users?: ReadonlyArray<IShareUser>; /** * Value to determine whether the screen is mobile. * */ isMobile?: boolean; /** * If true, the user-level permissions will be editable * */ editable?: boolean; /** * If the current logged in user the owner of the instance or not * */ isMeOwner?: boolean; /** * Callback function triggered when the permissions for an individual user are updated. */ onUserPermissionChange?: (id: string, permission: string) => void; /** * Callback function triggered when the user is removed. */ onUserRemoved?: (id: string) => void; /** * Callback function triggered when the user invite is resent. */ onUserResend?: (id: string, permission: string) => void; /** * Callback function to show the permission sheet, only available when screen size smaller than sm. */ onShowBottomSheet?: (shareConfig: IShareConfig) => void; }; export declare const AccessManager: React.FC<IAccessManager & StackProps>;