Fabric: Couple of ViewProps fields were exposed as getters

Summary: We have to have getters for all props/fields.

Reviewed By: mdvacca

Differential Revision: D7467792

fbshipit-source-id: 1492aad2d3398e6c14e0e354047730cf91201175
This commit is contained in:
Valentin Shergin 2018-04-10 12:45:43 -07:00 committed by Facebook Github Bot
parent dc1a9680de
commit a38f32a5a6
2 changed files with 17 additions and 0 deletions

View File

@ -45,6 +45,18 @@ void ViewProps::apply(const RawProps &rawProps) {
}
}
#pragma mark - Getters
SharedColor ViewProps::getForegroundColor() const {
return foregroundColor_;
}
SharedColor ViewProps::getBackgroundColor() const {
return backgroundColor_;
}
#pragma mark - DebugStringConvertible
SharedDebugStringConvertibleList ViewProps::getDebugProps() const {
ViewProps defaultProps = {};

View File

@ -28,6 +28,11 @@ class ViewProps:
public:
void apply(const RawProps &rawProps) override;
#pragma mark - Getters
SharedColor getForegroundColor() const;
SharedColor getBackgroundColor() const;
private:
int zIndex_ {0};
float opacity_ {1.0};