diff --git a/frontend/components/AtlasPreviewLoading/AtlasPreviewLoading.js b/frontend/components/AtlasPreviewLoading/AtlasPreviewLoading.js index bf6fbcbb..ac8fb67b 100644 --- a/frontend/components/AtlasPreviewLoading/AtlasPreviewLoading.js +++ b/frontend/components/AtlasPreviewLoading/AtlasPreviewLoading.js @@ -1,9 +1,7 @@ import React from 'react'; import ReactCSSTransitionGroup from 'react-addons-css-transition-group'; - -import styles from './AtlasPreviewLoading.scss'; -import classNames from 'classnames/bind'; -const cx = classNames.bind(styles); +import styled, { keyframes } from 'styled-components'; +import { Flex } from 'reflexbox'; import { randomInteger } from 'utils/random'; @@ -12,7 +10,7 @@ const randomValues = Array.from( () => `${randomInteger(85, 100)}%` ); -export default _props => { +export default () => { return ( { transitionEnterTimeout={0} transitionLeaveTimeout={0} > -
-
-
-
-
-
-
-
+ + + + + + ); }; + +const pulsate = keyframes` + 0% { opacity: 1; } + 50% { opacity: 0.5; } + 100% { opacity: 1; } +`; + +const Mask = styled(Flex)` + height: ${props => (props.header ? 28 : 18)}px; + margin-bottom: ${props => (props.header ? 32 : 14)}px; + background-color: #ddd; + animation: ${pulsate} 1.3s infinite; +`; diff --git a/frontend/components/AtlasPreviewLoading/AtlasPreviewLoading.scss b/frontend/components/AtlasPreviewLoading/AtlasPreviewLoading.scss deleted file mode 100644 index 1d2fd414..00000000 --- a/frontend/components/AtlasPreviewLoading/AtlasPreviewLoading.scss +++ /dev/null @@ -1,26 +0,0 @@ -.mask { - display: flex; - width: 100%; - background-color: #ddd; -} - -.header { - height: 28px; - margin-bottom: 32px; -} - -.bodyText { - height: 18px; - margin-bottom: 14px; -} - -.animated { - width: 100%; - animation: PULSATE 1.3s infinite; -} - -@keyframes PULSATE { - 0% { opacity: 1; } - 50% { opacity: 0.5; } - 100% { opacity: 1; } -} \ No newline at end of file