0.1.2 • Published 4 years ago
vgs-show-react-native v0.1.2
vgs-show-react-native
A react-native wrapper for VGS Show for displaying secure information using a proxy.
Installation
npm install vgs-show-react-nativeUsage
import VgsShowAttribute from 'vgs-show-react-native';
// ...
const vgsShow = React.useRef<VgsShowAttribute> = null;
<VgsShowAttribute
  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