-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Fix app embed * initial setup * Create ButtonWithSelect component * Use context * Use dialog * Handle app-bridge actions * Code adjustments, bump packages * Fix tests * Fix schema formatting * Send response * Use latest package versions
- Loading branch information
Showing
32 changed files
with
899 additions
and
205 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import { MockedResponse } from "@apollo/react-testing"; | ||
|
||
import { extensionList } from "./queries"; | ||
|
||
export const mocks: MockedResponse[] = [ | ||
{ | ||
request: { | ||
query: extensionList | ||
}, | ||
result: { | ||
data: [] | ||
} | ||
} | ||
]; |
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: 0 additions & 75 deletions
75
src/apps/components/AppDetailsSettingsPage/useAppConfigLoader.ts
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
import { | ||
Dialog, | ||
DialogContent, | ||
DialogProps, | ||
DialogTitle, | ||
IconButton, | ||
Typography | ||
} from "@material-ui/core"; | ||
import CloseIcon from "@material-ui/icons/Close"; | ||
import React from "react"; | ||
|
||
import { useStyles } from "./styles"; | ||
|
||
interface AppDialogProps extends DialogProps { | ||
onClose: () => void; | ||
} | ||
|
||
export const AppDialog: React.FC<AppDialogProps> = ({ children, ...props }) => { | ||
const classes = useStyles(); | ||
|
||
return ( | ||
<Dialog aria-labelledby="extension app dialog" {...props}> | ||
<DialogTitle disableTypography className={classes.header}> | ||
<Typography variant="h6" component="h2"> | ||
{props.title} | ||
</Typography> | ||
<IconButton color="inherit" onClick={props.onClose} aria-label="close"> | ||
<CloseIcon /> | ||
</IconButton> | ||
</DialogTitle> | ||
<DialogContent className={classes.content}>{children}</DialogContent> | ||
</Dialog> | ||
); | ||
}; | ||
|
||
export default AppDialog; |
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 * from "./AppDialog"; |
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,19 @@ | ||
import { makeStyles } from "@saleor/macaw-ui"; | ||
|
||
export const useStyles = makeStyles( | ||
() => ({ | ||
header: { | ||
display: "flex", | ||
justifyContent: "space-between", | ||
alignItems: "center" | ||
}, | ||
content: { | ||
margin: 0, | ||
padding: 0, | ||
overflow: "hidden", | ||
width: 600, | ||
height: 600 | ||
} | ||
}), | ||
{ name: "AppDialog" } | ||
); |
Oops, something went wrong.