Skip to content

Commit

Permalink
Merge pull request #3 from mtb-bank/development
Browse files Browse the repository at this point in the history
Fix frame color Android
  • Loading branch information
howljs authored Oct 18, 2022
2 parents 2690555 + 006c55c commit a7f7e82
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -63,4 +63,5 @@ buck-out/
# generated by bob
lib/
.cxx
.externalNativeBuild
.externalNativeBuild
.history
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,12 @@ public ScannerView createViewInstance(@NonNull ThemedReactContext reactContext)
}

@ReactProp(name = "frameColor")
public void setFrameColor(ScannerView view, int color) {
if (color == 0) {
public void setFrameColor(ScannerView view, String color) {
int parsedColor = Color.parseColor(color);
if (parsedColor == 0) {
view.resetFrameColor();
} else {
view.setFrameColor(color);
view.setFrameColor(parsedColor);
}
}

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "rn-card-scanner",
"version": "1.1.0",
"version": "1.1.1",
"description": "Credit card scanner for React Native",
"main": "lib/commonjs/index",
"module": "lib/module/index",
Expand Down

0 comments on commit a7f7e82

Please sign in to comment.