RCTSegmentedControlManager.m 822 B

1234567891011121314151617181920212223242526272829303132
  1. /*
  2. * Copyright (c) Facebook, Inc. and its affiliates.
  3. *
  4. * This source code is licensed under the MIT license found in the
  5. * LICENSE file in the root directory of this source tree.
  6. */
  7. #import "RCTSegmentedControlManager.h"
  8. #import "RCTBridge.h"
  9. #import "RCTConvert.h"
  10. #import "RCTSegmentedControl.h"
  11. @implementation RCTSegmentedControlManager
  12. RCT_EXPORT_MODULE()
  13. - (UIView *)view
  14. {
  15. return [RCTSegmentedControl new];
  16. }
  17. RCT_EXPORT_VIEW_PROPERTY(values, NSArray<NSString *>)
  18. RCT_EXPORT_VIEW_PROPERTY(selectedIndex, NSInteger)
  19. RCT_EXPORT_VIEW_PROPERTY(tintColor, UIColor)
  20. RCT_EXPORT_VIEW_PROPERTY(backgroundColor, UIColor)
  21. RCT_EXPORT_VIEW_PROPERTY(textColor, UIColor)
  22. RCT_EXPORT_VIEW_PROPERTY(momentary, BOOL)
  23. RCT_EXPORT_VIEW_PROPERTY(enabled, BOOL)
  24. RCT_EXPORT_VIEW_PROPERTY(onChange, RCTBubblingEventBlock)
  25. @end