diff --git a/apps/admin/src/view/Course/Create/Chatpter/index.tsx b/apps/admin/src/view/Course/Create/Chatpter/index.tsx index ff2fbc2..9fd791e 100644 --- a/apps/admin/src/view/Course/Create/Chatpter/index.tsx +++ b/apps/admin/src/view/Course/Create/Chatpter/index.tsx @@ -1,10 +1,71 @@ +import { MinusCircleOutlined, PlusOutlined } from "@ant-design/icons"; +import { Button, Col, Form, Input, Row, Space, Typography } from "antd"; +const { Text } = Typography; + interface IProps { onChange?: Function; styles?: React.CSSProperties; } const Chatpter = (props: IProps) => { - return
123
; + const [form] = Form.useForm(); + + const onBlur = () => { + console.log(form.getFieldsValue().chapter); + }; + + return ( +
+
+ + {(fields, { add, remove }, { errors }) => ( + <> + {fields.map((field, index) => ( + + + + {JSON.stringify(field)} + + {fields.length > 1 ? ( + remove(field.name)} /> + ) : null} + + ))} + + + + + + + + )} + +
+
+ ); }; export default Chatpter;