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.

69 lines (68 loc) 2.41 kB
import React from 'react'; import { PopoverProps } from '@mui/material/Popover'; import { ModalProps } from '@mui/material/Modal'; /** The props type of [[`AppItem`]]. */ export interface IAppItem { /** The text label displayed for the item. */ name: string; /** Source location for the image to display. Can be a remote URL or a reference to an imported file or a ReactNode, like icon */ logoSrc?: string | NonNullable<React.ReactNode>; /** The url to link to when clicked. Can be an absolute, or relative URL. */ url: string; /** Specifies the context in which the linked resource will open. */ target?: '_blank' | '_self'; /** * Optional test id to apply to the item. This will be applied to the top-level Link component. */ 'data-testid'?: string; } /** The props type of [[`AppSwitcherContainer`]]. */ export interface IAppSwitcher extends PopoverProps { /** * The solution items. * * ``` * interface IAppItem { * name: string; * logoSrc?: string | NonNullable<React.ReactNode>; * url: string; * target?: '_blank' | '_self'; * 'data-testid'?: string; * } * * ``` */ solutions: ReadonlyArray<IAppItem>; /** * Override for the Home button link (e.g., to point to a different environment for testing). * @default https://nexus.hexagon.com/home/ */ homeUrl?: string; /** * Override for the My Projects button link (e.g., to point to a different environment for testing). * @default https://nexus.hexagon.com/platform/ */ myProjectsUrl?: string; /** * The elevation of the component. * @default 8 */ elevation?: number; /** The url for more products. Click to jump to more products page. */ moreProductsUrl: string; /** * Callback fired when the component requests to be closed. * The `reason` parameter can optionally be used to control the response to `onClose`. */ onClose?: ModalProps['onClose']; /** * If `true`, the loading circle will appear. * @default false */ loading?: boolean; } /** * @param {IAppSwitcher} props - provides the properties fo React component * @return {ReactNode} - provides the react component to be ingested **/ export declare const AppSwitcherContainer: (props: IAppSwitcher) => import("react/jsx-runtime").JSX.Element;