@prosperitainova/dumbo-react-native
Version:
Dumbo for React Native Library
52 lines • 2.2 kB
TypeScript
import React from 'react';
import type { ViewProps, StyleProp, ViewStyle } from 'react-native';
import { DocumentViewerSource } from '../DocumentViewer';
/** Props for AcceptTerms component */
export type AcceptTermsProps = {
/** Title of text document */
title: string;
/** Content to render (supports HTML (text or URL) and plain text) */
source: DocumentViewerSource;
/** Disable padding (useful for loading websites) */
disableContainerPadding?: boolean;
/** Callback when flow finishes. Returns success variable indicating if user accepted or refused the terms */
resultsCallback: (result: boolean) => void;
/** Text strings needed for the flow */
textStrings: {
/** Disagree action on toolbar. Ex: "Disagree" */
disagree: string;
/** Agree action on toolbar. Ex: "Agree" */
agree: string;
/** Popup title for disagreeing. Ex: "Are you sure?" */
modalTitle: string;
/** Popup body for disagreeing. Ex: "The use of this app requires agreement to the Terms and Conditions." */
modalBody: string;
/** Popup seondary option for disagreeing. Ex: "Disagree" */
modalSecondaryAction: string;
/** Popup primary option for disagreeing. Ex: "Continue" */
modalPrimaryAction: string;
};
/** Force the view (mostly for teting) to a specific platform */
forceView?: 'ios' | 'android';
/** Style to set on the item */
style?: StyleProp<ViewStyle>;
/** Direct props to set on the React Native component (including iOS and Android specific props). Most use cases should not need this. */
componentProps?: ViewProps;
};
/**
* AcceptTerms component for showing the accept legal terms flow
*
* {@link https://github.com/carbon-design-system/carbon-react-native/blob/main/example/src/Views/AcceptsTerms.tsx | Example code}
*/
export declare class AcceptTerms extends React.Component<AcceptTermsProps> {
state: {
showDisagree: boolean;
};
private agree;
private disagree;
private disagreeMain;
private get disagreeModal();
private get footer();
render(): React.ReactNode;
}
//# sourceMappingURL=index.d.ts.map