color proptype defined to Loader

This commit is contained in:
NikolaBorislavovHristov 2019-04-19 12:03:36 +03:00
parent 3a30e8ae3c
commit 91aaa860f4

View file

@ -1,5 +1,8 @@
const React = require('react');
const PropTypes = require('prop-types');
const colors = require('stremio-colors');
// TODO: implement it with polygon and clip-path
const Loader = ({ fill, children, ...props }) => (
<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} />
@ -50,4 +53,12 @@ const Loader = ({ fill, children, ...props }) => (
</svg>
);
Loader.propTypes = {
fill: PropTypes.string.isRequired
};
Loader.defaultProps = {
fill: colors.surfacelighter80
};
module.exports = Loader;