-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Initial refactor commit * ✅ Added build and tests CI/CD * update: add src for admin settings * update: incorrect constant names * update: namespace * add: accessibility settings * update: webpack to output files inside a folder * update: build output folders * update: removed commented code * update: npm scripts * add: webpack config * add: hooks * update: move admin setting to the module folder * update: assets loading logic * update: add rule to move jsx props to multiline imporving readability * add: connect modal * update: hooks import for better readability * update: replace functions with hooks * fix: alignment and style * update: imports * update: removed conflicting imports * fix: add compatibility for mobile devices --------- Co-authored-by: Ohad <[email protected]>
- Loading branch information
1 parent
88d5396
commit 942076b
Showing
8 changed files
with
127 additions
and
5 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
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
68 changes: 68 additions & 0 deletions
68
modules/settings/assets/js/components/connect-modal/connect-modal-icon.js
Large diffs are not rendered by default.
Oops, something went wrong.
51 changes: 51 additions & 0 deletions
51
modules/settings/assets/js/components/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,51 @@ | ||
import Box from '@elementor/ui/Box'; | ||
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 { __ } from '@wordpress/i18n'; | ||
import { useAuth, useModal } from '../../hooks'; | ||
|
||
function ConnectModal() { | ||
const { isOpen } = useModal(); | ||
const { redirectToConnect } = useAuth(); | ||
|
||
return ( | ||
<Modal open={ isOpen }> | ||
<Grid container | ||
gap={ 2 } | ||
direction="column" | ||
justifyContent="start" | ||
alignItems="center" | ||
sx={ { | ||
position: 'absolute', | ||
top: '50%', | ||
left: '50%', | ||
transform: 'translate(-50%, -50%)', | ||
width: 600, | ||
maxWidth: '95%', | ||
height: 400, | ||
bgcolor: 'background.paper', | ||
boxShadow: 24, | ||
paddingBottom: 5, | ||
textAlign: 'center', | ||
borderRadius: '4px', | ||
} }> | ||
<Box component="div" sx={ { background: '#000', width: '100%', height: '200px' } }></Box> | ||
<Typography variant="subtitle1" | ||
marginTop={ 5 } | ||
marginBottom={ 3 }> | ||
{ __( 'Connect plugin on your site!', 'pojo-accessibility' ) } | ||
</Typography> | ||
<Button variant="contained" | ||
color="info" | ||
size="large" | ||
onClick={ redirectToConnect }> | ||
{ __( 'Connect', 'pojo-accessibility' ) } | ||
</Button> | ||
</Grid> | ||
</Modal> | ||
); | ||
} | ||
|
||
export default ConnectModal; |
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 @@ | ||
export { default as ConnectModal } from './connect-modal'; |
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,2 @@ | ||
export { useAuth } from './use-auth'; | ||
export { useModal } from './use-modal'; |
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