This repository has been archived by the owner on Feb 2, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add WrapperCenter for loadings * add cowloading svg + animations * add ids to svg + animations * add end of line to svg file * fix keyframe styles * change names and ids to camelCase * change id to class * move class to path instead of g tag * remove classes and use child selectors * remove classes from svg * svg animations for production * add CowLoading component on storybook * replace Spinner -> CowLoading * clean code * upgrade react-inlinesvg lib * clean CoWLoading svg * change svg without react-inlinesvg and fix storybook * use react-inlinesvg * center animation - restore spinner on tables * fix svg classes * remove spinner import * delete Cow example * center cow on BV * Adding CowLoading on Orders tab Co-authored-by: Ramiro Vazquez <[email protected]> Co-authored-by: Henry Palacios <[email protected]>
- Loading branch information
1 parent
8ca4258
commit 2f7ee66
Showing
12 changed files
with
127 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import React from 'react' | ||
// also exported from '@storybook/react' if you can deal with breaking changes in 6.1 | ||
import { Story, Meta } from '@storybook/react/types-6-0' | ||
import { GlobalStyles, ThemeToggler } from 'storybook/decorators' | ||
import CowLoading from './CowLoading' | ||
|
||
export default { | ||
title: 'Common/CowLoading', | ||
component: CowLoading, | ||
decorators: [GlobalStyles, ThemeToggler], | ||
} as Meta | ||
|
||
const Template: Story = () => <CowLoading /> | ||
|
||
export const Default = Template.bind({}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
import React from 'react' | ||
import styled, { keyframes } from 'styled-components' | ||
import SVG from 'react-inlinesvg' | ||
import CowLoadingSVG from 'assets/img/cowLoading.svg' | ||
|
||
export const WrapperCenter = styled.div` | ||
display: flex; | ||
align-items: center; | ||
justify-content: center; | ||
height: 100%; | ||
` | ||
|
||
const CowBounce = keyframes` | ||
0%, | ||
100% { | ||
transform: scale(0.95) translateX(1px); | ||
} | ||
50% { | ||
transform: scale(1); | ||
} | ||
` | ||
|
||
const EyesOpacity = keyframes` | ||
from { | ||
opacity: 1; | ||
} | ||
30% { | ||
opacity: 0.3; | ||
} | ||
to { | ||
opacity: 1; | ||
} | ||
` | ||
|
||
export const StyledCowLoading = styled(SVG)` | ||
.cowLoading { | ||
animation: ${CowBounce} 1.5s infinite ease-in-out; | ||
animation-delay: -1s; | ||
} | ||
.cowHead { | ||
fill: ${({ theme }): string => theme.white}; | ||
opacity: 0.4; | ||
} | ||
.eyesBg { | ||
fill: ${({ theme }): string => theme.bg1}; | ||
opacity: 1; | ||
} | ||
.eyes { | ||
fill: ${({ theme }): string => theme.orange}; | ||
animation: ${EyesOpacity} 1.5s ease-in-out infinite; | ||
filter: blur(1px); | ||
} | ||
` | ||
|
||
export const CowLoading: React.FC = () => ( | ||
<WrapperCenter> | ||
<StyledCowLoading src={CowLoadingSVG} /> | ||
</WrapperCenter> | ||
) | ||
|
||
export default CowLoading |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters