tikzForm.js 1.94 KB
import React,{Flagment} from 'react';
import { Drawer, Input, Button, Menu, Form, Col, Row, AutoComplete, Tooltip, Select } from 'antd';
import { UploadOutlined, RetweetOutlined } from '@ant-design/icons';
import 'react-draft-wysiwyg/dist/react-draft-wysiwyg.css';
import { PanZoom } from 'react-easy-panzoom';
import { InputNumber } from 'antd';
import { IFrame } from './iframe';
import './tikzForm.css';
const { TextArea } = Input;
const {Option} = Select;

const TikzForm = ({ svg, onClickEvent, onChangeTikz, onFinish, onChangeQno, onClickQno, tikzcode, fields, qno, onChangeTypeSol,onChangeTypeQue}) => {
	//svg
	//onclickevent : Tikz 변환하기 Button의 onClick Event
	//onChangeTikz : TextArea 컴포넌트의 onChange event
	//onFinish : Form data를 제출하기 위한 event
	//onSaveEvent : Tikz 등록하기의 버튼 event

console.log(fields);

	return (

	<Form  onFinish={onFinish}  fields={[...fields]}>

<Form.Item
          name="qno"
          label="그림 번호"
          rules={[
            {
              required: true,
              message: '그림번호를 입력해 주세요.',
            },
          ]}><Row>
          <Col>
            <InputNumber
              min={0}
			  max={10000}
			  value={qno}
              onChange={onChangeQno}>
            </InputNumber>
          </Col>
          <Col>
            <Button onClick={onClickQno}>번호 확인</Button>
          </Col>
        </Row>
        </Form.Item>
			
			<Form.Item
				name="typeQue"
				label="그림 형식 구분"
				rules={[
					{
					required: true,
					message: '그림 파일 유형을 선택해 주세요.',
					},
				]}
				wrapperCol={{span: 2 }}
				>
					<Select onChange={onChangeTypeQue}>
						<Option value="JPEG">JPEG</Option>
						<Option value="PNG">PNG</Option>
					</Select>
     	   </Form.Item>
				

			<Form.Item>
		<Button type="primary" htmlType="submit">
			저장하기
		</Button>
	</Form.Item>
	</Form>
	);
};

export default TikzForm;