sendBox.tsx 712 Bytes
Newer Older
Chunchi Che's avatar
Chunchi Che committed
1
import React, { useState } from "react";
Chunchi Che's avatar
Chunchi Che committed
2
import { Input, Button, Row, Col } from "antd";
Chunchi Che's avatar
Chunchi Che committed
3 4 5 6 7 8 9 10 11
import { SendOutlined } from "@ant-design/icons";

const SendBox = () => {
  const [content, setContent] = useState("");
  return (
    <>
      <Row>
        <Input.TextArea
          placeholder="Message to sent..."
Chunchi Che's avatar
Chunchi Che committed
12
          autoSize={{ minRows: 3, maxRows: 4 }}
Chunchi Che's avatar
Chunchi Che committed
13 14 15 16 17 18 19
          value={content}
          onChange={(e) => {
            setContent(e.target.value);
          }}
        />
      </Row>
      <Row>
Chunchi Che's avatar
Chunchi Che committed
20 21 22 23 24 25 26
        <Col>
          <Button
            icon={<SendOutlined />}
            onClick={() => {}}
            disabled={!content}
          />
        </Col>
Chunchi Che's avatar
Chunchi Che committed
27 28 29 30 31 32
      </Row>
    </>
  );
};

export default SendBox;