-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #27 from olliethedev/feat/blog-plugin
Feat/blog plugin
- Loading branch information
Showing
14 changed files
with
324 additions
and
190 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
{ | ||
"version": "1.1.23", | ||
"version": "1.2.0", | ||
"private": true, | ||
"workspaces": [ | ||
"./packages/*" | ||
|
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
2 changes: 1 addition & 1 deletion
2
packages/amplify-graphql-process-image-transformer/package.json
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
59 changes: 59 additions & 0 deletions
59
packages/amplify-util-blog/ui-components/blog/base/Modal.tsx
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,59 @@ | ||
import React from "react"; | ||
import { Button, Flex, Heading, View } from "@aws-amplify/ui-react"; | ||
import { Close } from "../icons/Close"; | ||
|
||
interface Props { | ||
title?: string; | ||
open?: boolean; | ||
onClose: () => void; | ||
children: React.ReactNode; | ||
} | ||
const Modal = ({ title, open, onClose, children }: Props) => { | ||
return ( | ||
<Flex | ||
style={{ | ||
zIndex: 1000, | ||
}} | ||
height="100vh" | ||
width="100vw" | ||
backgroundColor="rgba(25,22,10, 0.3)" | ||
position="fixed" | ||
top="0" | ||
bottom="0" | ||
left="0" | ||
right="0" | ||
direction="column" | ||
justifyContent="center" | ||
alignItems="center" | ||
overflow={{ base: "auto" }} | ||
onClick={onClose} | ||
display={open ? "flex" : "none"} | ||
> | ||
<View | ||
backgroundColor="white" | ||
borderRadius="20px" | ||
minWidth="300px" | ||
padding="20px 25px" | ||
overflow="auto" | ||
onClick={(e: any) => { | ||
// e.preventDefault(); | ||
e.stopPropagation(); | ||
}} | ||
> | ||
<Flex | ||
justifyContent="space-between" | ||
alignItems="center" | ||
paddingBottom="1rem" | ||
> | ||
<Heading level={3}>{title}</Heading> | ||
<Button onClick={onClose} borderRadius="20px" width="20px"> | ||
<Close /> | ||
</Button> | ||
</Flex> | ||
{children} | ||
</View> | ||
</Flex> | ||
); | ||
}; | ||
|
||
export default Modal; |
Oops, something went wrong.