mirror of
https://github.com/zoriya/react-native-svg.git
synced 2025-12-06 07:06:11 +00:00
# Summary Implement custom shadow nodes for nearly all `Svg` components. While it's a foundation for numerous upcoming changes, it currently addresses and resolves #2544. ## Test Plan There shouldn't be any noticeable changes, and everything should function as before, except that `onLayout` will now be triggered only once and with the correct dimensions. ## Compatibility | OS | Implemented | | ------- | :---------: | | iOS | ✅ | | MacOS | ✅ | | Android | ✅ | --------- Co-authored-by: Jakub Piasecki <jakubpiasecki67@gmail.com>
22 lines
643 B
TypeScript
22 lines
643 B
TypeScript
import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent';
|
|
import type { ViewProps } from './utils';
|
|
|
|
import { NumberProp } from '../lib/extract/types';
|
|
import type { UnsafeMixed } from './codegenUtils';
|
|
|
|
interface FilterPrimitiveCommonProps {
|
|
x?: UnsafeMixed<NumberProp>;
|
|
y?: UnsafeMixed<NumberProp>;
|
|
width?: UnsafeMixed<NumberProp>;
|
|
height?: UnsafeMixed<NumberProp>;
|
|
result?: string;
|
|
}
|
|
|
|
export interface NativeProps extends ViewProps, FilterPrimitiveCommonProps {
|
|
nodes?: ReadonlyArray<string>;
|
|
}
|
|
|
|
export default codegenNativeComponent<NativeProps>('RNSVGFeMerge', {
|
|
interfaceOnly: true,
|
|
});
|