(name, point)
| 8 | import NativeLinearGradient, { type Props } from './common'; |
| 9 | |
| 10 | const convertPoint = (name, point) => { |
| 11 | if (Array.isArray(point)) { |
| 12 | console.warn( |
| 13 | `LinearGradient '${name}' property should be an object with fields 'x' and 'y', ` + |
| 14 | 'Array type is deprecated.' |
| 15 | ); |
| 16 | } |
| 17 | // TODO: Update Android native code to receive a {x, y} object, not an array |
| 18 | if (point !== null && typeof point === 'object') { |
| 19 | return [point.x, point.y]; |
| 20 | } |
| 21 | return point; |
| 22 | }; |
| 23 | |
| 24 | /** |
| 25 | * Checks if value is a valid number. Otherwise, defaults to defaultValue. |
nothing calls this directly
no outgoing calls
no test coverage detected
searching dependent graphs…