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
502 B
TypeScript
21 lines
502 B
TypeScript
import React from 'react';
|
|
import {View} from 'react-native';
|
|
import {SvgXml} from 'react-native-svg';
|
|
|
|
const xml = `<!-- sample rectangle -->
|
|
<!-- <sample rectangle -->
|
|
<!-- <sample> rectangle -->
|
|
<svg width="200" height="200" xmlns="http://www.w3.org/2000/svg">
|
|
<rect width="100" height="100" x="50" y="50" fill="red" />
|
|
<text fill="black" x="100" y="100">test</text>
|
|
</svg>
|
|
`;
|
|
|
|
export default () => {
|
|
return (
|
|
<View style={{marginTop: 100}}>
|
|
<SvgXml xml={xml} />
|
|
</View>
|
|
);
|
|
};
|