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.3.1 to 0.4.0

src/__tests__/SpacedLayout-test.js

33

demo/index.js
import React from 'react';
import { storiesOf } from '@kadira/storybook';
import FlexLayout from '../src/FlexLayout';
import { FlexLayout, SpacedLayout } from '../src';

@@ -33,1 +33,32 @@ const Block = ({ style, children }) =>

));
storiesOf('SpacedLayout', module)
.add('Layout default spacing', () => (
<SpacedLayout>
<Block style={{ backgroundColor: 'lightblue' }}>Col 1</Block>
<Block style={{ backgroundColor: 'yellowgreen' }}>Col 2</Block>
</SpacedLayout>
))
.add('Layout spacing types', () => (
<section>
<SpacedLayout spacing="begin">
<Block style={{ backgroundColor: 'lightblue' }}>Col 1</Block>
<Block style={{ backgroundColor: 'yellowgreen' }}>Col 2</Block>
</SpacedLayout>
<SpacedLayout spacing="middle">
<Block style={{ backgroundColor: 'lightblue' }}>Col 1</Block>
<Block style={{ backgroundColor: 'yellowgreen' }}>Col 2</Block>
</SpacedLayout>
<SpacedLayout spacing="end">
<Block style={{ backgroundColor: 'lightblue' }}>Col 1</Block>
<Block style={{ backgroundColor: 'yellowgreen' }}>Col 2</Block>
</SpacedLayout>
<SpacedLayout spacing="between">
<Block style={{ backgroundColor: 'lightblue' }}>Col 1</Block>
<Block style={{ backgroundColor: 'yellowgreen' }}>Col 2</Block>
</SpacedLayout>
<SpacedLayout spacing="around">
<Block style={{ backgroundColor: 'lightblue' }}>Col 1</Block>
<Block style={{ backgroundColor: 'yellowgreen' }}>Col 2</Block>
</SpacedLayout>
</section>
));

2

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

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

@@ -35,3 +35,9 @@ # Layabout

`crossAxis` TO BE IMPLEMENTED
- Describes how to align content on the cross axis.
Options:
- `String` of one of the following: `begin`, `middle`, `end`
`gutterSpacing` TO BE IMPLEMENTED

@@ -56,4 +62,2 @@ - Spacing between content. Can be standard style units such as %, px, em.

### SpacedLayout
To be implemented
Lays out its children within the space available with any remaining spacing allocated according to the spacing property.

@@ -64,3 +68,3 @@

Options:
- `String` of one of the following: `between`, `around`, `begin`, `end`
- `String` of one of the following: `between`, `around`, `begin`, `end`, `middle`

@@ -77,3 +81,10 @@ If no value is provided spacing will be allocated to `between`.

`crossAxis` TO BE IMPLEMENTED
- Describes how to align content on the cross axis.
Options:
- `String` of one of the following: `begin`, `middle`, `end`
#### Example

@@ -80,0 +91,0 @@ ~~~~

@@ -6,7 +6,2 @@ import React from 'react';

describe('container', () => {
it('renders a div for a container', () => {
const container = shallow(<FlexLayout />).find('div');
expect(container).toBePresent();
});
describe('default behaviour', () => {

@@ -19,2 +14,6 @@ let container;

it('renders a div for a container', () => {
expect(container).toBePresent();
});
it('applies a flex display', () => {

@@ -24,3 +23,3 @@ expect(container).toHaveStyle('display', 'flex');

it('aligns its content in the center', () => {
it('aligns its content on the cross axis in the center', () => {
expect(container).toHaveStyle('alignItems', 'center');

@@ -27,0 +26,0 @@ });

export { default as FlexLayout } from './FlexLayout';
export { default as SpacedLayout } from './SpacedLayout';

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