Merge pull request #45 from LucidKobold/modals

Fix modals
This commit is contained in:
Lucid Kobold
2022-04-03 02:07:46 -05:00
committed by GitHub
3 changed files with 24 additions and 11 deletions

View File

@@ -58,6 +58,8 @@ const AddUpdateSticker = ({
const { addEditSticker } = useContext(StickersContext); const { addEditSticker } = useContext(StickersContext);
// ! Update these states to sat "add" and "edit" for easier reading.
const [modalVariant] = useState<"currDate" | "notCurrDate">( const [modalVariant] = useState<"currDate" | "notCurrDate">(
isSameDay(date, new Date()) ? "currDate" : "notCurrDate" isSameDay(date, new Date()) ? "currDate" : "notCurrDate"
); );
@@ -80,12 +82,23 @@ const AddUpdateSticker = ({
{ {
header: `Which sticker did you earn for ${format(date, "LLL d, y")}?`, header: `Which sticker did you earn for ${format(date, "LLL d, y")}?`,
body: ( body: (
<StickerSelector <VStack
stickerSet="Demo" w="100%"
currSticker={currSticker} h="auto"
selectedSticker={selectedSticker} justifyContent="space-between"
updateSelectedSticker={updateSelectedSticker} alignContent="center"
/> spacing="4"
>
<Heading textAlign="center" as="h3" size="md" w="100%" h="auto">
{"Select a sticker"}
</Heading>
<StickerSelector
stickerSet="Demo"
currSticker={currSticker}
selectedSticker={selectedSticker}
updateSelectedSticker={updateSelectedSticker}
/>
</VStack>
), ),
footer: ( footer: (
<Button <Button
@@ -133,9 +146,9 @@ const AddUpdateSticker = ({
footer: ( footer: (
<Button <Button
variant="primary" variant="primary"
// isDisabled={ isDisabled={
// selectedSticker === null || selectedSticker === currSticker selectedSticker === null || selectedSticker === currSticker
// } }
onClick={() => updateStep(step + 1)} onClick={() => updateStep(step + 1)}
> >
{"Next"} {"Next"}

View File

@@ -2,7 +2,7 @@
"private": true, "private": true,
"name": "lucid-creations-media-potty-chart", "name": "lucid-creations-media-potty-chart",
"homepage": "https://lucidcreations.media/introducing-code-name-potty-chart/", "homepage": "https://lucidcreations.media/introducing-code-name-potty-chart/",
"version": "v0.0.9.0-alpha", "version": "v0.0.9.1-alpha",
"author": { "author": {
"name": "Lucid Creations Media", "name": "Lucid Creations Media",
"url": "https://lucidcreations.media", "url": "https://lucidcreations.media",

View File

@@ -15,7 +15,7 @@ import appLogo from "../../public/images/logo.svg";
const Header = (): JSX.Element => { const Header = (): JSX.Element => {
const appName = "LCM Potty Chart"; const appName = "LCM Potty Chart";
const appVersion = "v0.0.9.0-alpha"; const appVersion = "v0.0.9.1-alpha";
// Add transparency while not at the top of the page. // Add transparency while not at the top of the page.
const [transparentNavbar, setTransparentNavbar] = useState<boolean>(false); const [transparentNavbar, setTransparentNavbar] = useState<boolean>(false);