mirror of
https://github.com/zoriya/react-native-svg.git
synced 2026-06-03 23:16:13 +00:00
refactor: expose SvgCss, SvgCssUri, inlineStyles
simplify CSSStyleDeclaration
This commit is contained in:
@@ -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
@@ -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') {
|
||||
|
||||
Reference in New Issue
Block a user