-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathHelloWorld.jsx
More file actions
49 lines (41 loc) · 1.37 KB
/
HelloWorld.jsx
File metadata and controls
49 lines (41 loc) · 1.37 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
"use client";
import React, { useState } from 'react';
import * as style from './HelloWorld.module.css';
const HelloWorld = (props) => {
const [name, setName] = useState(props.name);
return (
<div className={style.container}>
<h2 className={style.title}>Hello World Component</h2>
<p className={style.subtitle}>Lightweight React component with minimal dependencies</p>
<div className={style.formGroup}>
<label className={style.label} htmlFor="name">
Say hello to:
</label>
<input
id="name"
type="text"
value={name}
onChange={(e) => setName(e.target.value)}
className={style.input}
placeholder="Enter your name..."
/>
</div>
<div className={style.greeting}>
Hello, <strong>{name}</strong>! 👋
</div>
<div className={style.navigation}>
<a href="/heavy_markdown_editor" className={style.link}>
→ Try Heavy Markdown Editor
</a>
<a href="/rsc_markdown_page" className={style.link}>
→ Try RSC Markdown Page
</a>
<div className={style.bundleInfo}>
<strong>Bundle Size:</strong> Minimal - just React basics (~10.0KB total in production)
</div>
</div>
</div>
);
};
// Props are passed from Rails view
export default HelloWorld;