Merge pull request #37 from Stremio/loader

This commit is contained in:
Nikola Hristov 2019-03-25 17:05:04 +02:00 committed by GitHub
commit 80ce28d88a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 63 additions and 0 deletions

View file

@ -0,0 +1,58 @@
import React, { PureComponent } from 'react';
class Loader extends PureComponent {
render() {
const { fill, children, ...props } = this.props;
return (
<svg {...props} viewBox={'0 0 1024 1024'}>
<path d={'M512 0l-512 512 512 512 512-512zM411.106 752.941v-480.376l323.464 240.941z'} fill={fill} />
<path d={'M256,256 512,0 768,256 512,512Z'} fillOpacity={0.8}>
<animate
attributeType={'CSS'}
attributeName={'opacity'}
dur={'3s'}
values={'0.8;0.3;0.3;0.3;0.3;0.3'}
keyTimes={'0;0.2;0.4;0.6;0.8;1'}
calcMode={'discrete'}
repeatCount={'indefinite'}
/>
</path>
<path d={'M768,256 1024,512 768,768 512,512Z'} fillOpacity={0.8}>
<animate
attributeType={'CSS'}
attributeName={'opacity'}
dur={'3s'}
values={'0.8;0.8;0.3;0.3;0.3;0.3'}
keyTimes={'0;0.2;0.4;0.6;0.8;1'}
calcMode={'discrete'}
repeatCount={'indefinite'}
/>
</path>
<path d={'M768,768 512,1024 256,768 512,512Z'} fillOpacity={0.8}>
<animate
attributeType={'CSS'}
attributeName={'opacity'}
dur={'3s'}
values={'0.8;0.8;0.8;0.3;0.3;0.3'}
keyTimes={'0;0.2;0.4;0.6;0.8;1'}
calcMode={'discrete'}
repeatCount={'indefinite'}
/>
</path>
<path d={'M256,768 0,512 256,256 512,512Z'} fillOpacity={0.8}>
<animate
attributeType={'CSS'}
attributeName={'opacity'}
dur={'3s'}
values={'0.8;0.8;0.8;0.8;0.3;0.3'}
keyTimes={'0;0.2;0.4;0.6;0.8;1'}
calcMode={'discrete'}
repeatCount={'indefinite'}
/>
</path>
</svg>
);
}
}
export default Loader;

View file

@ -0,0 +1,3 @@
import Loader from './Loader';
export default Loader;

View file

@ -9,6 +9,7 @@ import NavBar from './NavBar';
import MetaItem from './MetaItem';
import ShareAddon from './ShareAddon';
import UserPanel from './UserPanel';
import Loader from './Loader';
export {
Checkbox,
@ -22,6 +23,7 @@ export {
MetaItem,
ShareAddon,
UserPanel,
Loader,
Slider,
FocusableProvider,
withFocusable