diff --git a/lib/__tests__/__snapshots__/formats.js.snap b/lib/__tests__/__snapshots__/formats.js.snap index 9e26687..3fc79ec 100644 --- a/lib/__tests__/__snapshots__/formats.js.snap +++ b/lib/__tests__/__snapshots__/formats.js.snap @@ -3,10 +3,10 @@ exports[`android.xml 1`] = ` " - #bada55 - 20px - /assets/images - 2 + #bada55 + 20px + /assets/images + 2 'Salesforce Sans', "Helvetica Neue", sans-serif " `; @@ -222,11 +222,11 @@ exports[`html 1`] = `
- - + +
- + @@ -235,7 +235,7 @@ exports[`html 1`] = ` - + - + - +
SpacingUsage
@@ -244,33 +244,33 @@ exports[`html 1`] = ` 20px

- - - - - - - - - - - - - + + + + + + + + + + + + +
- + @@ -279,7 +279,7 @@ exports[`html 1`] = ` - +
Background ColorsUsage
@@ -295,16 +295,16 @@ exports[`html 1`] = `

- - - - - - - - - - + + + + + + + + + +
diff --git a/lib/formats/android.xml.js b/lib/formats/android.xml.js index 99c963b..0499d35 100644 --- a/lib/formats/android.xml.js +++ b/lib/formats/android.xml.js @@ -10,9 +10,15 @@ module.exports = def => { .get("props") .map(prop => { const key = (() => { - switch (prop.type) { + switch (prop.get("type")) { case "color": - return prop.type; + return "color"; + case "size": + return "dimen"; + case "number": + return "integer"; + case "string": + return "string"; default: return "property"; } @@ -32,6 +38,8 @@ module.exports = def => { }) .toJS() }; - - return xml(o, { indent: " ", declaration: true }); + return xml(o, { + indent: " ", + declaration: true + }); };