react-native
react-native copied to clipboard
feat(border): [android] `border-style: none` support
Summary:
As part of #34425, borderStyle
value of none
should be supported.
In this PR, the BorderStyle
enum is extended and the logic is implemented to make the none
value work in both BorderDrawable
and CSSBackgroundDrawable
as currently there is a feature flag enableNewBackgroundAndBorderDrawables
controlling which class draws the border. The logic has been implemented in both classes so it works regardless of the feature flag value.
In this PR the border style value doesn't explicitly expose the newly accepted property none
in the types yet as the implementation for iOS is still needed. Notice the FlowFixMe
in the examples.
Changelog:
[ANDROID][ADDED] - border-style: none
support
Test Plan:
Two new examples are added. One for Text
and one for View
– both of them are setting some properties for the border which by default makes the components draw a border with a default BorderStyle.SOLID
, but since the property borderStyle: 'none'
is also passed, that default is overwritten hence you see no border applied.
Both examples have been tested with the enableNewBackgroundAndBorderDrawables
feature flag on and off.
Text Example | View Example |
---|---|