Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@khanacademy/wonder-blocks-layout

Package Overview
Dependencies
Maintainers
1
Versions
244
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@khanacademy/wonder-blocks-layout - npm Package Compare versions

Comparing version 1.0.3 to 1.0.4

components/strut.md

5

components/strut.js

@@ -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();
});
});

9

package.json
{
"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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc