jitsi-meet-electron/app/features/onboarding/components/EmailSettingSpotlight.js

69 lines
1.4 KiB
JavaScript

// @flow
import { Spotlight } from '@atlaskit/onboarding';
import React, { Component } from 'react';
import { connect } from 'react-redux';
import type { Dispatch } from 'redux';
import { continueOnboarding } from '../actions';
type Props = {
/**
* Redux dispatch.
*/
dispatch: Dispatch<*>;
};
/**
* Email Setting Spotlight Component.
*/
class EmailSettingSpotlight extends Component<Props, *> {
/**
* Initializes a new {@code EmailSettingSpotlight} instance.
*
* @inheritdoc
*/
constructor(props: Props) {
super(props);
this._next = this._next.bind(this);
}
/**
* Render function of component.
*
* @returns {ReactElement}
*/
render() {
return (
<Spotlight
actions = { [
{
onClick: this._next,
text: 'Next'
}
] }
dialogPlacement = 'top right'
target = { 'email-setting' } >
The email you enter here will be part of your user profile.
</Spotlight>
);
}
_next: (*) => void;
/**
* Close the spotlight component.
*
* @returns {void}
*/
_next() {
this.props.dispatch(continueOnboarding());
}
}
export default connect()(EmailSettingSpotlight);