-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex-Form.tsx.txt
More file actions
71 lines (68 loc) · 1.85 KB
/
index-Form.tsx.txt
File metadata and controls
71 lines (68 loc) · 1.85 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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
// register Metro design fonts
import "com.sweaxizone.metro/fonts";
// third-party
import { createRoot } from "react-dom/client";
import * as React from "react";
import {
Root,
Group,
HGroup,
VGroup,
Button,
Label,
Icon,
Form,
FormGroup,
TextInput,
} from "com.sweaxizone.metro/components";
import { RTLProvider } from "com.sweaxizone.metro/layout";
import {
Primary,
ThemePresets,
ThemeProvider,
type Theme,
} from "com.sweaxizone.metro/theme";
/**
* The test.
*/
function App() {
return (
<ThemeProvider theme={ThemePresets.get("dark")}>
<RTLProvider rtl={false}>
<Primary prefer={false}>
<Root
full
solid
selection={false}
style={{
overflowY: "auto",
}}>
<VGroup padding={10}>
<Form submit={()=>{alert("submitted!")}}>
<VGroup maxWidth={750} gap={10}>
<VGroup gap={10}>
<Label variant="heading">sign in</Label>
<TextInput id="email" email placeholder="E-mail" default=""/>
<TextInput id="password" password placeholder="Password" default=""/>
</VGroup>
<Group>
<Button variant="anchor">forgot my password</Button>
</Group>
<VGroup horizontalAlign="right">
<HGroup gap={10}>
<Button outline>Sign up</Button>
<Button type="submit" outline variant="primary">Sign in</Button>
</HGroup>
</VGroup>
</VGroup>
</Form>
</VGroup>
</Root>
</Primary>
</RTLProvider>
</ThemeProvider>
);
}
// Render App
const root = createRoot(document.getElementById("root")!);
root.render(<App />);