-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.js
52 lines (50 loc) · 1.22 KB
/
index.js
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
import React from "react";
import ReactDOM from "react-dom";
import { SelectMenu } from "./lib/index";
const darkMode = true;
ReactDOM.render(
<React.StrictMode>
<div style={{ height: 500, width: 500, padding: 5, backgroundColor: darkMode ? "#191B1D" : "white" }}>
<SelectMenu
options={[
{
name: "Hopper",
value: "hopper",
description: "Grace Hopper was an American computer scientist and US Navy rear admiral.",
groupID: 2,
},
{
name: "Holberton",
value: "holberton",
description: "Frances Elizabeth Holberton was one of the programmers of the first computer.",
groupID: 2,
},
{
name: "Teitelbaum",
value: "teitelbaum",
description: "Ruth Teitelbaum was one of the first computer programmers in the world",
groupID: 1,
},
{
name: "Tayyib",
value: "tayyib",
description: "Hey, it's me!",
},
{
name: "No Description",
value: "noDesc",
groupID: 3,
},
]}
defaultValue={"holberton"}
isSimple={false}
darkMode={darkMode}
maxWidth={300}
onChange={(e) => {
console.log(e);
}}
/>
</div>
</React.StrictMode>,
document.getElementById("root")
);