mirror of
https://github.com/Foundry376/Mailspring.git
synced 2024-11-11 18:32:20 +08:00
37 lines
1.1 KiB
JavaScript
37 lines
1.1 KiB
JavaScript
import React from 'react';
|
|
import PropTypes from 'prop-types';
|
|
import { RetinaImg } from 'mailspring-component-kit';
|
|
import OnboardingActions from './onboarding-actions';
|
|
import AccountProviders from './account-providers';
|
|
|
|
export default class AccountChoosePage extends React.Component {
|
|
static displayName = 'AccountChoosePage';
|
|
|
|
static propTypes = {
|
|
account: PropTypes.object,
|
|
};
|
|
|
|
_renderProviders() {
|
|
return AccountProviders.map(({ icon, displayName, provider }) => (
|
|
<div
|
|
key={provider}
|
|
className={`provider ${provider}`}
|
|
onClick={() => OnboardingActions.chooseAccountProvider(provider)}
|
|
>
|
|
<div className="icon-container">
|
|
<RetinaImg name={icon} mode={RetinaImg.Mode.ContentPreserve} className="icon" />
|
|
</div>
|
|
<span className="provider-name">{displayName}</span>
|
|
</div>
|
|
));
|
|
}
|
|
|
|
render() {
|
|
return (
|
|
<div className="page account-choose">
|
|
<h2>Connect an email account</h2>
|
|
<div className="provider-list">{this._renderProviders()}</div>
|
|
</div>
|
|
);
|
|
}
|
|
}
|