Skip to content

Commit

Permalink
nit: fixed indentation issues.
Browse files Browse the repository at this point in the history
  • Loading branch information
DeadHeadRussell authored and Andrew Russell committed Jan 24, 2017
1 parent f618b4d commit 3549bbb
Show file tree
Hide file tree
Showing 4 changed files with 50 additions and 50 deletions.
24 changes: 12 additions & 12 deletions src/.stories/Storybook.scss
Original file line number Diff line number Diff line change
Expand Up @@ -114,20 +114,20 @@

// Nested
.category {
height: auto;
margin-bottom: 20px;
height: auto;
margin-bottom: 20px;

.categoryHeader {
display: flex;
flex-flow: row nowrap;
align-items: center;
padding: 10px;
border-bottom: 1px solid #EFEFEF;
}
.categoryHeader {
display: flex;
flex-flow: row nowrap;
align-items: center;
padding: 10px;
border-bottom: 1px solid #EFEFEF;
}

.categoryList {
height: auto;
}
.categoryList {
height: auto;
}
}

// Divider
Expand Down
64 changes: 32 additions & 32 deletions src/.stories/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,28 +23,28 @@ function getItems(count, height) {
const Handle = SortableHandle(() => <div className={style.handle}></div>);

const Item = SortableElement((props) => {
return (
<div className={props.className} style={{
height: props.height
}}>
{props.shouldUseDragHandle && <Handle/>}
return (
<div className={props.className} style={{
height: props.height
}}>
{props.shouldUseDragHandle && <Handle/>}
<div className={style.wrapper}>
<span>Item</span> {props.value}
<span>Item</span> {props.value}
</div>
</div>
)
</div>
)
});

const Category = SortableElement((props) => {
return (
<div className={style.category}>
<div className={style.categoryHeader}>
<Handle/>
<span>Category {props.value}</span>
</div>
return (
<div className={style.category}>
<div className={style.categoryHeader}>
<Handle/>
<span>Category {props.value}</span>
</div>
<ListWrapper component={SortableList} className={style.categoryList} items={getItems(5, 59)} shouldUseDragHandle={true} helperClass={style.stylizedHelper} />
</div>
)
</div>
)
});

class ListWrapper extends Component {
Expand Down Expand Up @@ -252,17 +252,17 @@ const ShrinkingSortableList = SortableContainer(({className, isSorting, items, i
});

const NestedSortableList = SortableContainer(({className, items, isSorting, sortableHandlers}) => {
return (
<div className={className} {...sortableHandlers}>
{items.map((value, index) =>
<Category
key={`category-${value}`}
index={index}
value={value}
/>
)}
</div>
);
return (
<div className={className} {...sortableHandlers}>
{items.map((value, index) =>
<Category
key={`category-${value}`}
index={index}
value={value}
/>
)}
</div>
);
});

storiesOf('Basic Configuration', module)
Expand Down Expand Up @@ -310,11 +310,11 @@ storiesOf('Basic Configuration', module)
);
})
.add('Nested Lists', () => {
return (
<div className={style.root}>
<ListWrapper component={NestedSortableList} items={range(4)} shouldUseDragHandle={true} helperClass={style.stylizedHelper} />
</div>
);
return (
<div className={style.root}>
<ListWrapper component={NestedSortableList} items={range(4)} shouldUseDragHandle={true} helperClass={style.stylizedHelper} />
</div>
);
})

storiesOf('Advanced', module)
Expand Down
6 changes: 3 additions & 3 deletions src/SortableContainer/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -143,9 +143,9 @@ export default function sortableContainer(WrappedComponent, config = {withRef: f
}
};

nodeIsChild = node => {
return node.sortableInfo.manager == this.manager;
};
nodeIsChild = node => {
return node.sortableInfo.manager == this.manager;
};

handleMove = (e) => {
const {distance} = this.props;
Expand Down
6 changes: 3 additions & 3 deletions src/SortableElement/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,9 @@ export default function sortableElement (WrappedComponent, config = {withRef: fa
let node = this.node = findDOMNode(this);

node.sortableInfo = {
index,
collection,
manager: this.context.manager
index,
collection,
manager: this.context.manager
};

this.ref = {node};
Expand Down

0 comments on commit 3549bbb

Please sign in to comment.