New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

layabout

Package Overview
Dependencies
Maintainers
1
Versions
27
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

layabout - npm Package Compare versions

Comparing version 0.7.0 to 0.7.1

5

dist/Flex/layout.js

@@ -24,6 +24,7 @@ 'use strict';

var applyLayoutConstraints = function applyLayoutConstraints(children, sizes) {
return _react.Children.toArray(children).filter(_react.isValidElement).map(function (child, index) {
return _react.Children.toArray(children).filter(_react.isValidElement).map(function (child, index, _ref) {
var length = _ref.length;
return (0, _react.cloneElement)(child, {
style: Object.assign({}, child.props.style, {
flex: '0 0 ' + deriveFlex(index, sizes, children.length) + '%'
flex: '0 0 ' + deriveFlex(index, sizes, length) + '%'
}),

@@ -30,0 +31,0 @@ key: index

2

package.json
{
"name": "layabout",
"version": "0.7.0",
"version": "0.7.1",
"description": "Simple layout components for React",

@@ -5,0 +5,0 @@ "author": "Dan Mutton",

@@ -102,3 +102,2 @@ import React from 'react';

describe('sizes', () => {

@@ -145,3 +144,3 @@ it('gives each child the flexBasis for its position', () => {

const rendered = shallow(
<FlexLayout sizes={[3, 4, 1, 1, 1]}>
<FlexLayout>
{ false }

@@ -153,6 +152,6 @@ { null }

</FlexLayout>);
expect(rendered.find('#1')).toHaveStyle('flex', '0 0 30%');
expect(rendered.find('#2')).toHaveStyle('flex', '0 0 40%');
expect(rendered.find('#1')).toHaveStyle('flex', '0 0 50%');
expect(rendered.find('#2')).toHaveStyle('flex', '0 0 50%');
});
});
});

@@ -15,6 +15,6 @@ import { Children, cloneElement, isValidElement } from 'react';

.filter(isValidElement)
.map((child, index) => cloneElement(child, {
.map((child, index, { length }) => cloneElement(child, {
style: {
...child.props.style,
flex: `0 0 ${deriveFlex(index, sizes, children.length)}%`,
flex: `0 0 ${deriveFlex(index, sizes, length)}%`,
},

@@ -21,0 +21,0 @@ key: index,

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