Skip to content

Commit

Permalink
refactor: expose SvgCss, SvgCssUri, inlineStyles
Browse files Browse the repository at this point in the history
simplify CSSStyleDeclaration
  • Loading branch information
msand committed Oct 20, 2019
1 parent 41871ed commit dbab230
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions src/ReactNativeSVG.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -54,6 +55,9 @@ export {
SvgFromXml,
SvgUri,
SvgXml,
SvgCss,
SvgCssUri,
inlineStyles,
Shape,
RNSVGMarker,
RNSVGMask,
Expand Down
4 changes: 2 additions & 2 deletions src/css.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -350,7 +350,7 @@ const CSSStyleDeclaration = function(node) {
}
}
});
};
}

CSSStyleDeclaration.prototype.getProperty = function(propertyName) {
if (typeof propertyName === 'undefined') {
Expand Down

0 comments on commit dbab230

Please sign in to comment.