0.2.2 • Published 9 months ago

@duffel/react-native-components v0.2.2

Weekly downloads
-
License
MIT
Repository
github
Last release
9 months ago

@duffel/react-native-components

UI components to support selling travel with the Duffel API in your react native app.

Installation

yarn add @duffel/react-native-components

Usage

import {
  DuffelCardForm,
  useDuffelCardFormActions,
} from '@duffel/react-native-components';

function App() {
  const { ref, createCardForTemporaryUse } = useDuffelCardFormActions();
  return (
    <DuffelCardForm
      ref={ref}
      clientKey={clientKey}
      intent="to-create-card-for-temporary-use"
      onValidateSuccess={() => createCardForTemporaryUse()}
      onCreateCardForTemporaryUseSuccess={({ id }) => setResult(id)}
      onValidateFailure={() => console.error('onValidateFailure')}
      onCreateCardForTemporaryUseFailure={(error) => {
        console.error('onCreateCardForTemporaryUseFailure', error);
      }}
    />
  );
}

For documentation and help integrating with this component please contact help@duffel.com

0.2.2

9 months ago

0.2.2-canary.0

9 months ago

0.2.1

9 months ago

0.2.0

9 months ago

0.2.0-canary.0

9 months ago

0.1.1

9 months ago

0.1.0

9 months ago

0.1.0-canary.1

9 months ago

0.1.0-canary.0

9 months ago