From 3f1e381ded2d819ac4810902485998dd2aed0c71 Mon Sep 17 00:00:00 2001 From: Joe Vilches Date: Fri, 4 Oct 2024 17:07:05 -0700 Subject: [PATCH] Add RNTester box sizing example and e2e test round 2 Summary: Add the tests back! Changelog: [Internal] Reviewed By: NickGerleman Differential Revision: D63844898 fbshipit-source-id: 6c08557e54be01a1dc156cf72f187a5bb6c5d791 --- .../rn-tester/js/examples/View/ViewExample.js | 36 +++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/packages/rn-tester/js/examples/View/ViewExample.js b/packages/rn-tester/js/examples/View/ViewExample.js index f95b48e8562..2bb0ecff29d 100644 --- a/packages/rn-tester/js/examples/View/ViewExample.js +++ b/packages/rn-tester/js/examples/View/ViewExample.js @@ -668,6 +668,37 @@ function OutlineExample(): React.Node { ); } +function BoxSizingExample(): React.Node { + const styles = StyleSheet.create({ + boxSizingBox: { + padding: 5, + backgroundColor: 'green', + borderWidth: 5, + margin: 10, + width: 50, + height: 25, + }, + boxSizingChild: { + backgroundColor: 'red', + width: '100%', + height: '100%', + }, + }); + + return ( + + Content box 50x25 + + + + Border box 50x25 + + + + + ); +} + export default ({ title: 'View', documentationURL: 'https://reactnative.dev/docs/view', @@ -1312,5 +1343,10 @@ export default ({ name: 'outline', render: OutlineExample, }, + { + title: 'Box Sizing', + name: 'box-sizing', + render: BoxSizingExample, + }, ], }: RNTesterModule);