This repository was archived by the owner on Jan 31, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathTabs_Stories.bs.js
More file actions
62 lines (58 loc) · 2.58 KB
/
Copy pathTabs_Stories.bs.js
File metadata and controls
62 lines (58 loc) · 2.58 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
// Generated by ReScript, PLEASE EDIT WITH CARE
import * as Card from "../Card/Card.bs.js";
import * as Tabs from "./Tabs.bs.js";
import * as Curry from "rescript/lib/es6/curry.js";
import * as React from "react";
import * as Render from "../../lib/Render.bs.js";
import * as Helpers from "../../lib/Helpers.bs.js";
import * as Typography from "../Typography/Typography.bs.js";
import * as React$1 from "@storybook/react";
React$1.storiesOf("Tabs", Helpers.storybookModule).add("Basic usage", (function (param) {
var match = React.useState(function () {
return 0;
});
var setTab = match[1];
var tab = match[0];
var tabs = [
{
label: "Global feed",
id: 0
},
{
label: "Your feed",
id: 1
}
];
return React.createElement("div", undefined, React.createElement(Tabs.make, {
tabs: tabs,
onChange: (function (id) {
return Curry._1(setTab, (function (param) {
return id;
}));
}),
current: tab
}), React.createElement("br", undefined), React.createElement("div", undefined, React.createElement(Tabs.Panel.make, {
active: tab === 0,
children: React.createElement(Card.make, {
children: null
}, React.createElement(Typography.make, {
variant: "title",
level: 1,
children: Render.s("ReScript & React.js - Real World App")
}), React.createElement(Typography.make, {
children: Render.s("Texto")
}))
}), React.createElement(Tabs.Panel.make, {
active: tab === 1,
children: React.createElement(Card.make, {
children: React.createElement(Typography.make, {
variant: "title",
level: 2,
children: Render.s("The global feed...")
})
})
})));
}));
export {
}
/* Not a pure module */