Commit 417b34e
authored
fix: prevent parent expansion by skipping width/height setting to 100% on absolute SVG (#2752)
# Summary
This PR fixes issue: #2689
In the SVG component when we do not pass `width` and `height` props, we
set them to 100%. This caused problems when position is set to absolute
because the SVG would expand beyond its parent. I added an extra check
to only set width/height to 100% if `position !== 'absolute'`.
## Test Plan
Run the example from issue: #2689 and check if Views are filled properly
## Compatibility
| OS | Implemented |
| ------- | :---------: |
| iOS | ✅ |
| MacOS | ✅ |
| Android | ✅ |
| Web | ✅ |
## Checklist
- [X] I have tested this on a device and a simulator1 parent 92e46a4 commit 417b34e
1 file changed
+6
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
125 | 125 | | |
126 | 126 | | |
127 | 127 | | |
| 128 | + | |
128 | 129 | | |
129 | | - | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
130 | 135 | | |
131 | 136 | | |
132 | 137 | | |
| |||
0 commit comments