fix(react-sketchapp): fixed Svg export

This commit is contained in:
Sascha Zarhuber
2019-04-06 14:37:40 +02:00
parent 7965bb2353
commit 4af8d24ac7
2 changed files with 12 additions and 1 deletions

View File

@@ -1 +1,3 @@
export * from './Svg';
import Svg from './Svg';
export default Svg;

View File

@@ -6,11 +6,14 @@ import {
Text,
StyleSheet,
TextStyles,
Svg,
render,
renderToJSON,
Platform,
} from 'react-sketchapp';
import Circle from './lib/components/Svg/Circle';
// the styles object should be a mapped typed mapping the keys of the object literal to numbers
const styles = StyleSheet.create({
red: {
@@ -69,3 +72,9 @@ TextStyles.create(context as any, {
const shouldBeSketch = Platform.OS;
const shouldBe1 = Platform.Version;
const svg = () => (
<Svg viewBox="0 0 24 24">
<Circle cx="12" cy="12" r="6" fill="#ff0000" />
</Svg>
);