Skip to content

Commit

Permalink
fix: add hasBackDrop to index.d.ts (#71)
Browse files Browse the repository at this point in the history
* fix: add hasBackDrop to index.d.ts

* fix: move to dedicated cli for example creation
  • Loading branch information
CAMOBAP authored Jan 26, 2025
1 parent e329552 commit 9deccb7
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
1 change: 0 additions & 1 deletion .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ jobs:
java-version: 17
distribution: adopt
- run: |
# npm install -g ${{ matrix.pm }} react-native
npm run example -- --pm ${{ matrix.pm }}
working-directory: react-native-hcaptcha
env:
Expand Down
4 changes: 2 additions & 2 deletions __scripts__/generate-example.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Options:
// Simple argument parser function
function parseArgs(args) {
const options = {
cliName: 'react-native',
cliName: '@react-native-community/cli',
projectName: 'react_native_hcaptcha_example',
projectRelativeProjectPath: '../react-native-hcaptcha-example',
packageManager: 'yarn',
Expand All @@ -35,7 +35,7 @@ function parseArgs(args) {
};

const argHandlers = {
'--expo': () => options.cliName = 'expo',
'--expo': () => options.cliName = 'create-expo-app@latest',
'--template': (value) => options.projectTemplate = value,
'--name': (value) => {
options.projectName = value.replace(/[^a-zA-Z0-9]/g, '_');
Expand Down
5 changes: 5 additions & 0 deletions index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@ type ConfirmHcaptchaProps = Omit<HcaptchaProps, 'url' | 'style'> & {
* The url domain defined on your hCaptcha. You generally will not need to change this.
*/
baseUrl?: string;
/**
* Defines if the modal backdrop is shown (true by default). If `hasBackdrop=false`,
* `backgroundColor` will apply only after the hCaptcha visual challenge is presented.
*/
hasBackdrop?: boolean;
}

export default class ConfirmHcaptcha extends React.Component<ConfirmHcaptchaProps> {
Expand Down

0 comments on commit 9deccb7

Please sign in to comment.