-
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.
- Loading branch information
1 parent
1528868
commit 0bf6e2c
Showing
12 changed files
with
301 additions
and
39 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
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
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,52 @@ | ||
import { | ||
Sheet, | ||
SheetContent, | ||
SheetDescription, | ||
SheetHeader, | ||
SheetTitle, | ||
SheetTrigger, | ||
} from "@/components/ui/sheet" | ||
import Menu from "./menu" | ||
import { Button } from "./ui/button" | ||
import { Sparkles } from "lucide-react" | ||
import { useState } from "react" | ||
|
||
/** | ||
* smallest component possible for mobile menu | ||
* @param props | ||
* @returns | ||
*/ | ||
export default function MobileMenu( | ||
{ handleGenerate, | ||
isGenerating }: { handleGenerate: (formData: FormData) => void, isGenerating: boolean }) { | ||
const [open,setOpen] = useState(false) | ||
return <Sheet open={open} onOpenChange={setOpen}> | ||
<SheetTrigger> | ||
<Button | ||
className={`md:hidden | ||
w-full rounded-xl transition-all duration-300 transform hover:scale-105 | ||
flex items-center justify-center space-x-2 | ||
text-white font-semibold shadow-lg hover:shadow-xl | ||
`} | ||
> | ||
<Sparkles className="size-5" /> | ||
<span>立即制作</span> | ||
</Button> | ||
</SheetTrigger> | ||
<SheetContent className="flex flex-col h-screen"> | ||
<SheetHeader> | ||
<SheetTitle>开始制作</SheetTitle> | ||
</SheetHeader> | ||
<div className="flex-1 h-1"> | ||
<Menu | ||
isGenerating={isGenerating} | ||
handleGenerate={data => { | ||
setOpen(false) | ||
return handleGenerate(data) | ||
}} | ||
className="!border-none p-0 m-0 !shadow-none" /> | ||
</div> | ||
</SheetContent> | ||
</Sheet> | ||
|
||
} |
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.