-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[APP-837] Add post connect modal (#120)
* add: post connect modal * update: settings prefix * fix: connect modal design * update: connect modal text * add: connect modal graphics * update: connect modal icon * update: post connect modal * update: sidebar menu text * update: text of icon settings * update: text * update: php compatibility with return types
- Loading branch information
Showing
17 changed files
with
275 additions
and
333 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
297 changes: 0 additions & 297 deletions
297
modules/settings/assets/js/components/connect-modal/connect-modal-icon.js
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
75 changes: 75 additions & 0 deletions
75
modules/settings/assets/js/components/post-connect-modal/index.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
import Button from '@elementor/ui/Button'; | ||
import Grid from '@elementor/ui/Grid'; | ||
import Modal from '@elementor/ui/Modal'; | ||
import Typography from '@elementor/ui/Typography'; | ||
import { useModal, useStorage } from '@ea11y/hooks'; | ||
import { PostConnectModalIcon } from '@ea11y/icons'; | ||
import { __ } from '@wordpress/i18n'; | ||
|
||
const PostConnectModal = () => { | ||
const { isOpen, close } = useModal(); | ||
const { save } = useStorage(); | ||
|
||
const onClose = async () => { | ||
await save({ | ||
ea11y_close_post_connect_modal: true, | ||
}); | ||
close(); | ||
}; | ||
|
||
return ( | ||
<Modal open={isOpen}> | ||
<Grid | ||
container | ||
direction="column" | ||
alignItems="center" | ||
justifyContent="center" | ||
sx={{ | ||
position: 'absolute', | ||
top: '50%', | ||
left: '50%', | ||
transform: 'translate(-50%, -50%)', | ||
width: 600, | ||
maxWidth: '100%', | ||
height: 530, | ||
backgroundColor: 'background.paper', | ||
boxShadow: 24, | ||
p: '20px', | ||
textAlign: 'center', | ||
borderRadius: '4px', | ||
}} | ||
> | ||
<PostConnectModalIcon /> | ||
<Typography | ||
variant="h5" | ||
color="text.primary" | ||
marginTop={5} | ||
marginBottom={1} | ||
> | ||
{__("You're all set", 'site-mailer')} | ||
</Typography> | ||
<Typography | ||
variant="body2" | ||
sx={{ width: '500px', maxWidth: '100%' }} | ||
color="text.primary" | ||
marginBottom={5} | ||
> | ||
{__( | ||
'The One Click Accessibility widget is now active and ready to use on your site!', | ||
'site-mailer', | ||
)} | ||
</Typography> | ||
<Button | ||
variant="contained" | ||
sx={{ padding: '8px 22px', width: '300px' }} | ||
onClick={onClose} | ||
color="info" | ||
> | ||
{__('Done', 'pojo-accessibility')} | ||
</Button> | ||
</Grid> | ||
</Modal> | ||
); | ||
}; | ||
|
||
export default PostConnectModal; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
44 changes: 44 additions & 0 deletions
44
modules/settings/assets/js/icons/post-connect-modal-icon.js
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters