Browse Source

Changed button.title to button.text

yogevbd 6 years ago
parent
commit
77f6f69474

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

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

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

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