Load dashboard items in one

This commit is contained in:
Jori Lallo
2017-09-10 22:59:14 -07:00
parent f3112d1393
commit 14b7f07e7f
3 changed files with 38 additions and 23 deletions

View File

@@ -1,11 +1,16 @@
// @flow
import React from 'react';
import _ from 'lodash';
import ReactCSSTransitionGroup from 'react-addons-css-transition-group';
import styled from 'styled-components';
import Mask from './components/Mask';
import Flex from 'components/Flex';
export default (props: Object) => {
type Props = {
count: number,
};
const ListPlaceHolder = ({ count }: Props) => {
return (
<ReactCSSTransitionGroup
transitionName="fadeIn"
@@ -16,18 +21,22 @@ export default (props: Object) => {
transitionEnter
transitionLeave
>
<Item column auto>
<Mask header />
<Mask />
</Item>
<Item column auto>
<Mask header />
<Mask />
</Item>
{_.times(count, () => (
<Item column auto>
<Mask header />
<Mask />
</Item>
))}
</ReactCSSTransitionGroup>
);
};
ListPlaceHolder.defaultProps = {
count: 2,
};
const Item = styled(Flex)`
padding: 18px 0;
`;
export default ListPlaceHolder;