refactor: expose SvgCss, SvgCssUri, inlineStyles

simplify CSSStyleDeclaration
This commit is contained in:
Mikael Sand
2019-10-20 18:47:56 +03:00
parent 41871ed315
commit dbab230238
2 changed files with 6 additions and 2 deletions
+4
View File
@@ -23,6 +23,7 @@ import Pattern, { RNSVGPattern } from './elements/Pattern';
import Mask, { RNSVGMask } from './elements/Mask';
import Marker, { RNSVGMarker } from './elements/Marker';
import { parse, SvgAst, SvgFromUri, SvgFromXml, SvgUri, SvgXml } from './xml';
import { SvgCss, SvgCssUri, inlineStyles } from './css';
export {
Svg,
@@ -54,6 +55,9 @@ export {
SvgFromXml,
SvgUri,
SvgXml,
SvgCss,
SvgCssUri,
inlineStyles,
Shape,
RNSVGMarker,
RNSVGMask,
+2 -2
View File
@@ -315,7 +315,7 @@ function getCssStr(element) {
return element.children || [];
}
const CSSStyleDeclaration = function(node) {
function CSSStyleDeclaration(node) {
this.style = node.props.style;
this.properties = new Map();
const { styles } = node;
@@ -350,7 +350,7 @@ const CSSStyleDeclaration = function(node) {
}
}
});
};
}
CSSStyleDeclaration.prototype.getProperty = function(propertyName) {
if (typeof propertyName === 'undefined') {