mirror of
https://github.com/PlayEdu/backend
synced 2025-12-23 05:39:38 +08:00
added: 测试页面
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
export * from "./footer";
|
||||
export * from "./header";
|
||||
export * from "./leftMenu";
|
||||
export * from "./leftMenu";
|
||||
export * from "./uploadImageButton";
|
||||
0
src/compenents/uploadImageButton/index.less
Normal file
0
src/compenents/uploadImageButton/index.less
Normal file
33
src/compenents/uploadImageButton/index.tsx
Normal file
33
src/compenents/uploadImageButton/index.tsx
Normal file
@@ -0,0 +1,33 @@
|
||||
import React, { useState } from "react";
|
||||
import { Button, Drawer } from "antd";
|
||||
|
||||
export const UploadImageButton: React.FC = () => {
|
||||
const [showModal, setShowModal] = useState<boolean>(false);
|
||||
|
||||
return (
|
||||
<>
|
||||
<Button
|
||||
onClick={() => {
|
||||
setShowModal(true);
|
||||
}}
|
||||
>
|
||||
上传图片
|
||||
</Button>
|
||||
|
||||
{showModal && (
|
||||
<Drawer
|
||||
title="Basic Drawer"
|
||||
placement="right"
|
||||
onClose={() => {
|
||||
setShowModal(false);
|
||||
}}
|
||||
open={showModal}
|
||||
>
|
||||
<p>Some contents...</p>
|
||||
<p>Some contents...</p>
|
||||
<p>Some contents...</p>
|
||||
</Drawer>
|
||||
)}
|
||||
</>
|
||||
);
|
||||
};
|
||||
Reference in New Issue
Block a user