PluginProbe
Leadpages / 1.1.2
Leadpages v1.1.2
1.3.0 1.2.1 1.2.2 1.2.3 trunk 1.0.0 1.1.0 1.1.1 1.1.2 1.1.3 1.1.4 1.2.0
leadpages / src / SettingsView.tsx

SettingsView.tsx in Leadpages 1.1.2, at src/SettingsView.tsx

31 lines 1.1 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 import { render, useState } from '@wordpress/element';
2 import { Card, CardBody, Button } from '@wordpress/components';
3 import SignOutModal from './components/Modals/SignOutModal';
4 import './styles/settings.css';
5
6 function SettingsView() {
7 const [isOpen, setOpen] = useState(false);
8 const openModal = () => setOpen(true);
9 const closeModal = () => setOpen(false);
10
11 return (
12 <div className="root">
13 <h1 className="heading">Leadpages</h1>
14 <h4>SETTINGS</h4>
15 <Card className="settings-card">
16 <CardBody size="small">
17 <h3 className="account-header">Leadpages Account</h3>
18 <Button variant="secondary" onClick={openModal}>
19 Sign Out
20 </Button>
21 {isOpen && <SignOutModal onClose={closeModal} />}
22 </CardBody>
23 </Card>
24 </div>
25 );
26 }
27
28 export default SettingsView;
29
30 window.addEventListener('load', () => render(<SettingsView />, document.getElementById('settings-page-root')));
31