@khanacademy/wonder-blocks-layout
Advanced tools
Comparing version 1.0.3 to 1.0.4
@@ -17,8 +17,9 @@ // @flow | ||
render() { | ||
return <View aria-hidden="true" style={flexBasis(this.props.size)} />; | ||
return <View aria-hidden="true" style={strutStyle(this.props.size)} />; | ||
} | ||
} | ||
const flexBasis = (size) => { | ||
const strutStyle = (size) => { | ||
return { | ||
width: size, | ||
MsFlexBasis: size, | ||
@@ -25,0 +26,0 @@ MsFlexPreferredSize: size, |
@@ -144,3 +144,3 @@ module.exports = | ||
value: function render() { | ||
return React.createElement(_wonderBlocksCore.View, { "aria-hidden": "true", style: flexBasis(this.props.size) }); | ||
return React.createElement(_wonderBlocksCore.View, { "aria-hidden": "true", style: strutStyle(this.props.size) }); | ||
} | ||
@@ -155,4 +155,5 @@ }]); | ||
var flexBasis = function flexBasis(size) { | ||
var strutStyle = function strutStyle(size) { | ||
return { | ||
width: size, | ||
MsFlexBasis: size, | ||
@@ -159,0 +160,0 @@ MsFlexPreferredSize: size, |
@@ -49,2 +49,51 @@ // This file is auto-generated by gen-snapshot-tests.js | ||
}); | ||
it("example 2", () => { | ||
const {StyleSheet} = require("aphrodite"); | ||
const {View} = require("@khanacademy/wonder-blocks-core"); | ||
const styles = StyleSheet.create({ | ||
row: { | ||
flexDirection: "row", | ||
}, | ||
}); | ||
const example = ( | ||
<View style={styles.row}> | ||
<View style={styles.row}> | ||
This should | ||
<Strut size={16} /> | ||
not wrap. | ||
</View> | ||
</View> | ||
); | ||
const tree = renderer.create(example).toJSON(); | ||
expect(tree).toMatchSnapshot(); | ||
}); | ||
it("example 3", () => { | ||
const {StyleSheet} = require("aphrodite"); | ||
const {View} = require("@khanacademy/wonder-blocks-core"); | ||
const styles = StyleSheet.create({ | ||
row: { | ||
flexDirection: "row", | ||
}, | ||
}); | ||
const example = ( | ||
<View style={styles.row}> | ||
<View style={styles.row}> | ||
No | ||
<Strut size={16} /> | ||
overlap! | ||
</View> | ||
<View style={styles.row}> | ||
No | ||
<Strut size={16} /> | ||
overlap! | ||
</View> | ||
</View> | ||
); | ||
const tree = renderer.create(example).toJSON(); | ||
expect(tree).toMatchSnapshot(); | ||
}); | ||
}); |
{ | ||
"name": "@khanacademy/wonder-blocks-layout", | ||
"version": "1.0.3", | ||
"version": "1.0.4", | ||
"design": "v1", | ||
@@ -10,2 +10,3 @@ "publishConfig": { | ||
"main": "dist/index.js", | ||
"module": "dist/es/index.js", | ||
"source": "index.js", | ||
@@ -16,7 +17,7 @@ "scripts": { | ||
"dependencies": { | ||
"@khanacademy/wonder-blocks-core": "^1.1.1", | ||
"@khanacademy/wonder-blocks-spacing": "^2.0.4" | ||
"@khanacademy/wonder-blocks-core": "^1.2.0", | ||
"@khanacademy/wonder-blocks-spacing": "^2.0.5" | ||
}, | ||
"devDependencies": { | ||
"@khanacademy/wonder-blocks-button": "^2.0.1" | ||
"@khanacademy/wonder-blocks-button": "^2.1.0" | ||
}, | ||
@@ -23,0 +24,0 @@ "peerDependencies": { |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
33927
12
403