mirror of
https://github.com/zoriya/react-native-svg.git
synced 2025-12-05 22:56:11 +00:00
# Summary Due to the large number of example apps in the repository, I decided to change the structure and move all applications into an "apps" folder to maintain a clear structure.
21 lines
668 B
TypeScript
21 lines
668 B
TypeScript
import {View} from 'react-native';
|
|
import {G, Rect, Svg} from 'react-native-svg';
|
|
|
|
export default function App() {
|
|
return (
|
|
<View style={{flex: 1, justifyContent: 'center', alignItems: 'center'}}>
|
|
<Svg width="150" height="150" viewBox="0 0 150 150">
|
|
<G opacity="0.5">
|
|
<Rect width="100" height="100" fill="red" />
|
|
<Rect x="50" y="50" width="100" height="100" fill="green" />
|
|
</G>
|
|
</Svg>
|
|
|
|
<Svg width="150" height="150" viewBox="0 0 150 150" opacity="0.5">
|
|
<Rect width="100" height="100" fill="red" />
|
|
<Rect x="50" y="50" width="100" height="100" fill="green" />
|
|
</Svg>
|
|
</View>
|
|
);
|
|
}
|