-
Notifications
You must be signed in to change notification settings - Fork 2
/
index.js
executable file
·49 lines (43 loc) · 1.37 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
import React from "react";
import ReactDOM from "react-dom";
import ExerciseDescription from "./ExerciseDescription";
import FruitPicker from "./FruitPicker";
import { Panel, Tooltip, Whisper } from "rsuite";
import "rsuite/dist/styles/rsuite-default.css";
import "./styles.css";
const tooltipMessage = (
<Tooltip>
<span role="img" aria-label="good job">🏆</span> LAST one you made it! Amazing work!
</Tooltip>
);
const PanelHeader = () =>(
<h3>
Solution
<Whisper placement="top" trigger="hover" speaker={tooltipMessage}>
<span role="img" aria-label="gun"> 🔫</span>
</Whisper>
</h3>
)
function App() {
return (
<>
<ExerciseDescription
title="Display a combo to select a piece of fruit"
youtubeId="QNnUXFDP70M"
exerciseFilename="FruitPicker"
description={
<p>
As part of our new diet, our nutritionist has suggested us to eat more fruit, unsurprisingly. She's particularly interested on apples and oranges.
<br/>
Let's display a dropdown to pick a piece of fruit, with the ability of showing a different default element each time.
</p>
}
/>
<Panel header={<PanelHeader/>} bordered>
<FruitPicker selected='Apple' />
</Panel>
</>
);
}
const rootElement = document.getElementById("root");
ReactDOM.render(<App />, rootElement);