mirror of
https://github.com/LBRYFoundation/lbry-desktop.git
synced 2025-08-28 16:01:26 +00:00
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
36 lines
842 B
JavaScript
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;
|