-
-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy pathHome.tsx
53 lines (45 loc) · 1.29 KB
/
Home.tsx
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
50
51
52
53
import { formToJSON } from 'web-utility';
import { AnimateCSS, FC, lazy, WebCellProps } from '../source';
import { ClassClock, FunctionClock } from './Clock';
import { TestField } from './Field';
const Async = lazy(() => import('./Async'));
const Hello: FC<WebCellProps> = ({ className, children }) => (
<h1 className={className}>Hello {children}!</h1>
);
export const HomePage = () => (
<>
<AnimateCSS
type="fadeIn"
component={props => <Hello {...props}>WebCell</Hello>}
/>
<div>
We use the same configuration as Parcel to bundle this sandbox, you
can find more info about Parcel
<a
href="https://parceljs.org"
target="_blank"
rel="noopener noreferrer"
>
here
</a>
.
</div>
<ul>
<li>
<FunctionClock />
</li>
<li>
<ClassClock />
</li>
</ul>
<form
onSubmit={({ currentTarget }) =>
alert(JSON.stringify(formToJSON(currentTarget)))
}
>
<TestField name="test" />
<button>√</button>
</form>
<Async>content</Async>
</>
);