0.0.7 • Published 2 years ago

@schnecke/vgs-show-react-native v0.0.7

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

vgs-show-react-native

A react-native wrapper for VGS Show for displaying secure information using a proxy.

Installation

npm install @schnecke/vgs-show-react-native

Usage

import VgsShowAttribute from '@schnecke/vgs-show-react-native';

// ...

const vgsShow = React.useRef<VgsShowAttribute> = null;

<VgsShow
  ref={vgsShow}
  initParams={{
    environment: ENV,
    vaultId: VAULT_ID,
    // optional, if needed for the upstream service
    customHeaders: {
      Authorization: 'Bearer ' + customerToken,
    },
  }}
  contentPath="data.attributes.pan"
  placeholder="Value will appear here"
  style={styles.box}
/>;

// To trigger reveal:
<Button onPress={vgsShow.current?.reveal(PATH, METHOD, CUSTOM_PAYLOAD)}>

Contributing

See the contributing guide to learn how to contribute to the repository and the development workflow.

License

MIT