-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add navigation * Export app bridge instance
- Loading branch information
Showing
10 changed files
with
272 additions
and
131 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import { Box } from "@saleor/macaw-ui"; | ||
import React from "react"; | ||
|
||
interface AppContentProps { | ||
children: React.ReactNode; | ||
} | ||
|
||
export const AppContent = ({ children }: AppContentProps) => { | ||
return <Box __height="90vh">{children}</Box>; | ||
}; |
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,35 @@ | ||
import React from "react"; | ||
import { Text } from "@saleor/macaw-ui"; | ||
import Link from "next/link"; | ||
import { useRouter } from "next/router"; | ||
|
||
interface NavigationTileProps { | ||
href: string; | ||
children: React.ReactNode; | ||
} | ||
|
||
export const NavigationTile = ({ href, children }: NavigationTileProps) => { | ||
const router = useRouter(); | ||
const { pathname } = router; | ||
|
||
const isActive = pathname === href; | ||
return ( | ||
<Link href={href}> | ||
<Text | ||
padding={2} | ||
borderRadius={4} | ||
backgroundColor={ | ||
isActive | ||
? "default1Pressed" | ||
: { | ||
hover: "default1Hovered", | ||
} | ||
} | ||
display="flex" | ||
gap={2} | ||
> | ||
{children} | ||
</Text> | ||
</Link> | ||
); | ||
}; |
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,21 @@ | ||
import { Box, Text } from "@saleor/macaw-ui"; | ||
|
||
const ConfigurationPage = () => { | ||
return ( | ||
<> | ||
<Box | ||
display="flex" | ||
flexDirection="column" | ||
height="100%" | ||
width="100%" | ||
justifyContent="center" | ||
alignItems="center" | ||
gap={4} | ||
> | ||
<Text size={7}>🚀 Welcome to Dummy Payment App!</Text> | ||
</Box> | ||
</> | ||
); | ||
}; | ||
|
||
export default ConfigurationPage; |
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
Oops, something went wrong.