Browse Source

Changed button.title to button.text

yogevbd 6 years ago
parent
commit
77f6f69474

+ 1
- 1
lib/ios/RNNNavigationButtons.m View File

@@ -64,7 +64,7 @@
64 64
 
65 65
 -(RNNUIBarButtonItem*)buildButton: (NSDictionary*)dictionary {
66 66
 	NSString* buttonId = dictionary[@"id"];
67
-	NSString* title = dictionary[@"title"];
67
+	NSString* title = dictionary[@"text"];
68 68
 	NSDictionary* component = dictionary[@"component"];
69 69
 	
70 70
 	if (!buttonId) {

+ 4
- 4
lib/ios/ReactNativeNavigationTests/RNNRootViewControllerTest.m View File

@@ -441,7 +441,7 @@
441 441
 }
442 442
 
443 443
 -(void)testRightButtonsWithTitle_withoutStyle {
444
-	self.options.topBar.rightButtons = @[@{@"id": @"testId", @"title": @"test"}];
444
+	self.options.topBar.rightButtons = @[@{@"id": @"testId", @"text": @"test"}];
445 445
 	__unused UINavigationController* nav = [[UINavigationController alloc] initWithRootViewController:self.uut];
446 446
 	[self.uut viewWillAppear:false];
447 447
 
@@ -456,7 +456,7 @@
456 456
 -(void)testRightButtonsWithTitle_withStyle {
457 457
 	NSNumber* inputColor = @(0xFFFF0000);
458 458
 
459
-	self.options.topBar.rightButtons = @[@{@"id": @"testId", @"title": @"test", @"enabled": @false, @"buttonColor": inputColor, @"buttonFontSize": @22, @"buttonFontWeight": @"800"}];
459
+	self.options.topBar.rightButtons = @[@{@"id": @"testId", @"text": @"test", @"enabled": @false, @"buttonColor": inputColor, @"buttonFontSize": @22, @"buttonFontWeight": @"800"}];
460 460
 	__unused UINavigationController* nav = [[UINavigationController alloc] initWithRootViewController:self.uut];
461 461
 	[self.uut viewWillAppear:false];
462 462
 
@@ -472,7 +472,7 @@
472 472
 
473 473
 
474 474
 -(void)testLeftButtonsWithTitle_withoutStyle {
475
-	self.options.topBar.leftButtons = @[@{@"id": @"testId", @"title": @"test"}];
475
+	self.options.topBar.leftButtons = @[@{@"id": @"testId", @"text": @"test"}];
476 476
 	__unused UINavigationController* nav = [[UINavigationController alloc] initWithRootViewController:self.uut];
477 477
 	[self.uut viewWillAppear:false];
478 478
 
@@ -487,7 +487,7 @@
487 487
 -(void)testLeftButtonsWithTitle_withStyle {
488 488
 	NSNumber* inputColor = @(0xFFFF0000);
489 489
 
490
-	self.options.topBar.leftButtons = @[@{@"id": @"testId", @"title": @"test", @"enabled": @false, @"buttonColor": inputColor, @"buttonFontSize": @22, @"buttonFontWeight": @"800"}];
490
+	self.options.topBar.leftButtons = @[@{@"id": @"testId", @"text": @"test", @"enabled": @false, @"buttonColor": inputColor, @"buttonFontSize": @22, @"buttonFontWeight": @"800"}];
491 491
 	__unused UINavigationController* nav = [[UINavigationController alloc] initWithRootViewController:self.uut];
492 492
 	[self.uut viewWillAppear:false];
493 493