lbry-desktop/src/renderer/component/spinner/view.jsx
Sean Yesmunt 492b1601f6 feature: use internal-apis for subscriptions and add page loader
update subscription types

update changelog

Simplify subscriptions sync logic

add claim type

use let over const

change spinner color based on theme

clean up subscriptions
2018-05-15 11:16:14 -04:00

36 lines
842 B
JavaScript

// @flow
import * as React from 'react';
import classnames from 'classnames';
import { DARK_THEME, LIGHT_THEME } from 'constants/themes';
type Props = {
dark?: boolean, // always a dark spinner
light?: boolean, // always a light spinner
theme: string,
};
const Spinner = (props: Props) => {
const { dark, light, theme } = props;
return (
<div
className={classnames('spinner', {
'spinner--dark': !light && (dark || theme === LIGHT_THEME),
'spinner--light': !dark && (light || theme === DARK_THEME),
})}
>
<div className="rect rect1" />
<div className="rect rect2" />
<div className="rect rect3" />
<div className="rect rect4" />
<div className="rect rect5" />
</div>
);
};
Spinner.defaultProps = {
dark: false,
light: false,
};
export default Spinner;