mirror of
https://github.com/lidarr/lidarr.git
synced 2025-07-08 05:51:47 -07:00
* New: UI Updates, Tag manager, More custom filters * fixup! Fix ScanFixture Unit Tests * Fixed: Sentry Errors from UI don't have release, branch, environment * Changed: Bump Mobile Detect for New Device Detection * Fixed: Build on changes to package.json * fixup! Add MetadataProfile filter option * fixup! Tag Note, Blacklist, Manual Import * fixup: Remove connectSection * fixup: root folder comment
39 lines
759 B
JavaScript
39 lines
759 B
JavaScript
import PropTypes from 'prop-types';
|
|
import React from 'react';
|
|
import { kinds } from 'Helpers/Props';
|
|
import SpinnerErrorButton from 'Components/Link/SpinnerErrorButton';
|
|
|
|
function OAuthInput(props) {
|
|
const {
|
|
label,
|
|
authorizing,
|
|
error,
|
|
onPress
|
|
} = props;
|
|
|
|
return (
|
|
<div>
|
|
<SpinnerErrorButton
|
|
kind={kinds.PRIMARY}
|
|
isSpinning={authorizing}
|
|
error={error}
|
|
onPress={onPress}
|
|
>
|
|
{label}
|
|
</SpinnerErrorButton>
|
|
</div>
|
|
);
|
|
}
|
|
|
|
OAuthInput.propTypes = {
|
|
label: PropTypes.string.isRequired,
|
|
authorizing: PropTypes.bool.isRequired,
|
|
error: PropTypes.object,
|
|
onPress: PropTypes.func.isRequired
|
|
};
|
|
|
|
OAuthInput.defaultProps = {
|
|
label: 'Start OAuth'
|
|
};
|
|
|
|
export default OAuthInput;
|