22
33import { hello } from "./chatServer" ;
44
5- export function ChatForm ( ) {
6- return < button className = "btn" onClick = { hello } > あああ</ button >
7- }
5+ export function ChatForm ( ) { return (
6+ < >
7+ < style jsx > { `
8+ /* 簡単なCSSで見た目を整える(オプション) */
9+ .form-container {
10+ background-color: white;
11+ border-radius: 10px;
12+ box-shadow: 0 4px 8px rgba(67, 204, 216, 0.86);
13+ padding: 20px;
14+ width: 90%;
15+ max-width: 1000px;
16+ display: flex;
17+ flex-direction: column;
18+ }
19+ .input-area {
20+ border: 1px solid #ccc;
21+ border-radius: 8px;
22+ padding: 5px 15 px;
23+ margin-bottom: 15px;
24+ min-height: 150px; /* 入力欄の高さ */
25+ display: flex;
26+ }
27+ .text-input {
28+ border: none;
29+ outline: none;
30+ flex-grow: 1;
31+ font-size: 16px;
32+ resize: none; /* テキストエリアのリサイズを無効化 */
33+ overflow: auto;
34+ padding: 10px;
35+ }
36+ .controls {
37+ display: flex;
38+ align-items: center;
39+ justify-content: space-between;
40+ }
41+ .left-icons button {
42+ background: none;
43+ border: none;
44+ font-size: 24px;
45+ cursor: pointer;
46+ color: #555;
47+ margin-right: 15px;
48+ padding: 5px;
49+ }
50+ .left-icons button:hover {
51+ color: #000;
52+ }
53+ .left-icons span {
54+ font-size: 14px;
55+ vertical-align: middle;
56+ margin-left: 5px;
57+ color: #555;
58+ }
59+ .right-controls {
60+ display: flex;
61+ align-items: center;
62+ }
63+ .voice-icon button {
64+ background: none;
65+ border: none;
66+ font-size: 24px;
67+ cursor: pointer;
68+ color: #555;
69+ margin-right: 15px;
70+ padding: 5px;
71+ }
72+ .voice-icon button:hover {
73+ color: #000;
74+ }
75+ .send-button {
76+ background-color: #007bff; /* 青色の送信ボタン */
77+ color: white;
78+ border: none;
79+ border-radius: 50%; /* 丸いボタン */
80+ width: 40px;
81+ height: 40px;
82+ display: flex;
83+ justify-content: center;
84+ align-items: center;
85+ font-size: 20px;
86+ cursor: pointer;
87+ box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
88+ transition: background-color 0.3s ease;
89+ }
90+ .send-button:hover {
91+ background-color: #0056b3;
92+ }
93+ ` } </ style >
94+
95+ < div className = "form-container" >
96+ < div className = "input-area" >
97+ < textarea className = "text-input" placeholder = "質問を入力してください" > </ textarea >
98+ </ div >
99+
100+ < div className = "controls" >
101+ < div className = "left-icons" >
102+
103+ </ div >
104+ < div className = "right-controls" >
105+ < button type = "submit" className = "send-button" title = "送信" >
106+ < span className = "icon" > ➤</ span >
107+ </ button >
108+ </ div >
109+ </ div >
110+ </ div >
111+ </ >
112+ ) }
0 commit comments