Skip to content

Commit

Permalink
Merge pull request #184 from swizes/feature/testID-prop
Browse files Browse the repository at this point in the history
add testID prop
  • Loading branch information
awesomejerry authored Aug 13, 2024
2 parents 9c26c99 + f6bb54a commit 10fca2e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ export interface QRCodeProps {
ecl?: "L" | "M" | "Q" | "H";
/* error handler called when matrix fails to generate */
onError?: Function;
testID?: string
}

export default QRCode;
3 changes: 2 additions & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,8 @@ const QRCode = ({
linearGradient = ['rgb(255,0,0)', 'rgb(0,255,255)'],
ecl = 'M',
getRef,
onError
onError,
testID
}) => {
const result = useMemo(() => {
try {
Expand Down

0 comments on commit 10fca2e

Please sign in to comment.