synapse-react-client
Version:
[](https://badge.fury.io/js/synapse-react-client) [](https://github.com/prettier/prettie
56 lines • 2.26 kB
TypeScript
import { ManagedACTAccessRequirement, ManagedACTAccessRequirementStatus, RestrictionInformationResponse } from '@sage-bionetworks/synapse-types';
import { ReactNode } from 'react';
export type ManagedACTAccessRequirementItemViewProps = {
/**
* The ManagedACTAccessRequirement to be displayed.
*/
accessRequirement: ManagedACTAccessRequirement;
/**
* The user's status for this access requirement.
*/
accessRequirementStatus?: ManagedACTAccessRequirementStatus;
/**
* A ReactNode that contains the wiki page content for this access requirement.
*/
wikiPage?: ReactNode;
/**
* Whether the component is currently loading data.
*/
isLoading: boolean;
/**
* If available, the restriction information relevant to the subject that this
* access requirement is being displayed for.
*
* This is used to determine if the user is exempt from meeting this requirement.
*/
restrictionInformation?: RestrictionInformationResponse;
/**
* Invoked when the user clicks the "I do not accept" button.
*/
onRejectTerms: () => void;
/**
* Invoked when the user clicks the "Request access" button.
*/
onRequestAccess: () => void;
/**
* Invoked when the user clicks the "Cancel Request" button (only shown if a request is active).
*/
onCancelDataAccessRequest: () => void;
/**
* ReactNode to display if there is an error in the component.
*/
error?: ReactNode;
/**
* Whether the a request to cancel the data access request is currently pending.
*/
cancelRequestIsPending: boolean;
};
/**
* Renders a {@link RequirementItem} for a ManagedACTAccessRequirement, which allows a user to see if they have met the
* requirement, and if not, complete a data access request to apply for access.
*
* This is a UI-only component that does not make any requests to external stores, and is exported for testing/Storybook only.
*/
export declare function ManagedACTAccessRequirementItemView(props: ManagedACTAccessRequirementItemViewProps): import("react/jsx-runtime").JSX.Element;
export default ManagedACTAccessRequirementItemView;
//# sourceMappingURL=ManagedACTAccessRequirementItemView.d.ts.map