@slashid/react
Version:
React SDK for the /id platform
23 lines • 990 B
TypeScript
import { ReactNode } from "react";
import { OrganizationDetails } from "@slashid/slashid";
interface Props {
fallback?: ReactNode;
filter?: (organization: OrganizationDetails) => boolean;
renderLabel?: (organization: OrganizationDetails) => ReactNode;
}
/**
* First class client-side organization switcher.
*
* Renders a list of the users available organizations, upon selection
* the SDK will switch organizational context to the selected organization
* and trigger re-render for all code which implements the user object.
*
* See also: useOrganizations()
*
* @param filter A predicate function to filter the available organizations shown
* @param fallback The content shown while organizations are being fetched
* @param renderLabel A render function called for each item in the menu
*/
export declare const OrganizationSwitcher: ({ filter, fallback, renderLabel, }: Props) => import("react/jsx-runtime").JSX.Element;
export {};
//# sourceMappingURL=index.d.ts.map