@bigbinary/neetoui 2.0.89 → 2.0.93
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +2 -2
- package/v2/formik.js +2 -2
- package/v2/index.js +2 -2
- package/v2/layouts.js +5 -5
- package/stories/Alert.stories.jsx +0 -38
- package/stories/Avatar.stories.jsx +0 -178
- package/stories/Button.stories.jsx +0 -451
- package/stories/Callout.stories.jsx +0 -37
- package/stories/Checkout.stories.jsx +0 -46
- package/stories/Color.stories.mdx +0 -170
- package/stories/Dropdown.stories.jsx +0 -104
- package/stories/Header.stories.jsx +0 -45
- package/stories/HelpersBorderColor.stories.mdx +0 -162
- package/stories/HelpersBoxShadows.stories.mdx +0 -83
- package/stories/HelpersColor.stories.mdx +0 -170
- package/stories/Iconography.stories.jsx +0 -120
- package/stories/Input.stories.jsx +0 -187
- package/stories/Introduction.stories.mdx +0 -103
- package/stories/Label.stories.jsx +0 -29
- package/stories/Layouts.stories.jsx +0 -246
- package/stories/MenuBar.stories.jsx +0 -119
- package/stories/Modal.stories.jsx +0 -183
- package/stories/PageLoader.stories.jsx +0 -41
- package/stories/Pagination.stories.jsx +0 -26
- package/stories/Pane.stories.jsx +0 -67
- package/stories/Radio.stories.jsx +0 -34
- package/stories/Select.stories.jsx +0 -162
- package/stories/Sidebar.stories.jsx +0 -123
- package/stories/SubHeader.stories.jsx +0 -39
- package/stories/Switch.stories.jsx +0 -52
- package/stories/Tab.stories.jsx +0 -71
- package/stories/Tag.stories.jsx +0 -149
- package/stories/Textarea.stories.jsx +0 -55
- package/stories/Toastr.stories.jsx +0 -63
- package/stories/Tooltip.stories.jsx +0 -137
- package/stories/Typography.stories.jsx +0 -134
|
@@ -1,170 +0,0 @@
|
|
|
1
|
-
import { Meta, Story } from "@storybook/addon-docs";
|
|
2
|
-
|
|
3
|
-
export const colorPalette = [
|
|
4
|
-
{
|
|
5
|
-
name: "$neeto-ui-white",
|
|
6
|
-
value: "#ffffff",
|
|
7
|
-
compiledValue: "#ffffff",
|
|
8
|
-
},
|
|
9
|
-
{
|
|
10
|
-
name: "$neeto-ui-black",
|
|
11
|
-
value: "#1b1f23",
|
|
12
|
-
compiledValue: "#1b1f23",
|
|
13
|
-
},
|
|
14
|
-
{
|
|
15
|
-
name: "$neeto-ui-gray-800",
|
|
16
|
-
value: "#2f3941",
|
|
17
|
-
compiledValue: "#2f3941",
|
|
18
|
-
},
|
|
19
|
-
{
|
|
20
|
-
name: "$neeto-ui-gray-700",
|
|
21
|
-
value: "#49545c",
|
|
22
|
-
compiledValue: "#49545c",
|
|
23
|
-
},
|
|
24
|
-
{
|
|
25
|
-
name: "$neeto-ui-gray-600",
|
|
26
|
-
value: "#68737d",
|
|
27
|
-
compiledValue: "#68737d",
|
|
28
|
-
},
|
|
29
|
-
{
|
|
30
|
-
name: "$neeto-ui-gray-500",
|
|
31
|
-
value: "#87929d",
|
|
32
|
-
compiledValue: "#87929d",
|
|
33
|
-
},
|
|
34
|
-
{
|
|
35
|
-
name: "$neeto-ui-gray-400",
|
|
36
|
-
value: "#c2c8cc",
|
|
37
|
-
compiledValue: "#c2c8cc",
|
|
38
|
-
},
|
|
39
|
-
{
|
|
40
|
-
name: "$neeto-ui-gray-300",
|
|
41
|
-
value: "#d8dcde",
|
|
42
|
-
compiledValue: "#d8dcde",
|
|
43
|
-
},
|
|
44
|
-
{
|
|
45
|
-
name: "$neeto-ui-gray-200",
|
|
46
|
-
value: "#e9ebed",
|
|
47
|
-
compiledValue: "#e9ebed",
|
|
48
|
-
},
|
|
49
|
-
{
|
|
50
|
-
name: "$neeto-ui-gray-100",
|
|
51
|
-
value: "#f8f9f9",
|
|
52
|
-
compiledValue: "#f8f9f9",
|
|
53
|
-
},
|
|
54
|
-
{
|
|
55
|
-
name: "$neeto-ui-success",
|
|
56
|
-
value: "#00ba88",
|
|
57
|
-
compiledValue: "#00ba88",
|
|
58
|
-
},
|
|
59
|
-
{
|
|
60
|
-
name: "$neeto-ui-info",
|
|
61
|
-
value: "#276ef1",
|
|
62
|
-
compiledValue: "#276ef1",
|
|
63
|
-
},
|
|
64
|
-
{
|
|
65
|
-
name: "$neeto-ui-warning",
|
|
66
|
-
value: "#f3cd82",
|
|
67
|
-
compiledValue: "#f3cd82",
|
|
68
|
-
},
|
|
69
|
-
{
|
|
70
|
-
name: "$neeto-ui-error",
|
|
71
|
-
value: "#f56a58",
|
|
72
|
-
compiledValue: "#f56a58",
|
|
73
|
-
},
|
|
74
|
-
{
|
|
75
|
-
name: "$neeto-ui-pastel-blue",
|
|
76
|
-
value: "#eaf3fc",
|
|
77
|
-
compiledValue: "#eaf3fc",
|
|
78
|
-
},
|
|
79
|
-
{
|
|
80
|
-
name: "$neeto-ui-pastel-green",
|
|
81
|
-
value: "#ebf5ec",
|
|
82
|
-
compiledValue: "#ebf5ec",
|
|
83
|
-
},
|
|
84
|
-
{
|
|
85
|
-
name: "$neeto-ui-pastel-yellow",
|
|
86
|
-
value: "#fff2d7",
|
|
87
|
-
compiledValue: "#fff2d7",
|
|
88
|
-
},
|
|
89
|
-
{
|
|
90
|
-
name: "$neeto-ui-pastel-red",
|
|
91
|
-
value: "#ffefed",
|
|
92
|
-
compiledValue: "#ffefed",
|
|
93
|
-
},
|
|
94
|
-
{
|
|
95
|
-
name: "$neeto-ui-pastel-teal",
|
|
96
|
-
value: "#98f3f4",
|
|
97
|
-
compiledValue: "#98f3f4",
|
|
98
|
-
},
|
|
99
|
-
{
|
|
100
|
-
name: "$neeto-ui-secondary-indigo",
|
|
101
|
-
value: "#5e5ce6",
|
|
102
|
-
compiledValue: "#5e5ce6",
|
|
103
|
-
},
|
|
104
|
-
{
|
|
105
|
-
name: "$neeto-ui-secondary-green",
|
|
106
|
-
value: "#00ba88",
|
|
107
|
-
compiledValue: "#00ba88",
|
|
108
|
-
},
|
|
109
|
-
{
|
|
110
|
-
name: "$neeto-ui-secondary-teal",
|
|
111
|
-
value: "#64d2ff",
|
|
112
|
-
compiledValue: "#64d2ff",
|
|
113
|
-
},
|
|
114
|
-
];
|
|
115
|
-
|
|
116
|
-
<Meta title="Foundation/Helpers/Color" />
|
|
117
|
-
|
|
118
|
-
<style>{`
|
|
119
|
-
.story-demo-table tr{
|
|
120
|
-
background: transparent !important;
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
`}</style>
|
|
124
|
-
|
|
125
|
-
# Colors
|
|
126
|
-
|
|
127
|
-
<table className="story-demo-table">
|
|
128
|
-
<thead>
|
|
129
|
-
<tr>
|
|
130
|
-
<td></td>
|
|
131
|
-
<td>Hex code</td>
|
|
132
|
-
<td>Variable name</td>
|
|
133
|
-
<td>Text color class</td>
|
|
134
|
-
<td>Background color class</td>
|
|
135
|
-
</tr>
|
|
136
|
-
</thead>
|
|
137
|
-
<tbody>
|
|
138
|
-
{colorPalette.map((color) => {
|
|
139
|
-
return (
|
|
140
|
-
<tr key={color.name}>
|
|
141
|
-
<td>
|
|
142
|
-
<div
|
|
143
|
-
className={`w-12 h-12 cursor-pointer rounded-full shadow-xl ${color.name.replace(
|
|
144
|
-
"$neeto-ui",
|
|
145
|
-
"neeto-ui-bg"
|
|
146
|
-
)}`}
|
|
147
|
-
></div>
|
|
148
|
-
</td>
|
|
149
|
-
<td>
|
|
150
|
-
<code>{color.value}</code>
|
|
151
|
-
</td>
|
|
152
|
-
<td>
|
|
153
|
-
<code>{color.name}</code>
|
|
154
|
-
</td>
|
|
155
|
-
<td>
|
|
156
|
-
<div className="flex justify-between">
|
|
157
|
-
<code>{`${color.name.replace("$neeto-ui", "neeto-ui-text")}`}</code>
|
|
158
|
-
<b className={`ml-2 ${color.name.replace("$neeto-ui", "neeto-ui-text")}`}>
|
|
159
|
-
Aa
|
|
160
|
-
</b>
|
|
161
|
-
</div>
|
|
162
|
-
</td>
|
|
163
|
-
<td className={`${color.name.replace("$neeto-ui", "neeto-ui-bg")}`}>
|
|
164
|
-
<code>{`${color.name.replace("$neeto-ui", "neeto-ui-bg")}`}</code>
|
|
165
|
-
</td>
|
|
166
|
-
</tr>
|
|
167
|
-
);
|
|
168
|
-
})}
|
|
169
|
-
</tbody>
|
|
170
|
-
</table>
|
|
@@ -1,120 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import * as iconset from "@bigbinary/neeto-icons";
|
|
3
|
-
|
|
4
|
-
const applications = [
|
|
5
|
-
"NeetoAnalytics",
|
|
6
|
-
"NeetoCal",
|
|
7
|
-
"NeetoChangelog",
|
|
8
|
-
"NeetoChat",
|
|
9
|
-
"NeetoDesk",
|
|
10
|
-
"NeetoForm",
|
|
11
|
-
"NeetoInsights",
|
|
12
|
-
"NeetoInterview",
|
|
13
|
-
"NeetoInvisible",
|
|
14
|
-
"NeetoKb",
|
|
15
|
-
"NeetoQuiz",
|
|
16
|
-
"NeetoReplay",
|
|
17
|
-
"NeetoWireframe",
|
|
18
|
-
];
|
|
19
|
-
|
|
20
|
-
export default {
|
|
21
|
-
title: "Foundation/Iconography",
|
|
22
|
-
parameters: {
|
|
23
|
-
layout: "padded",
|
|
24
|
-
docs: {
|
|
25
|
-
description: {
|
|
26
|
-
component:
|
|
27
|
-
'`import { Clock } from "@bigbinary/neeto-icons";` <br><br> Anywhere in your React file <br><br> `<Clock color="#1e1e20" size={24} />`',
|
|
28
|
-
},
|
|
29
|
-
},
|
|
30
|
-
},
|
|
31
|
-
};
|
|
32
|
-
|
|
33
|
-
export const Iconography = () => {
|
|
34
|
-
return (
|
|
35
|
-
<div className="p-4">
|
|
36
|
-
<p className="mb-4">
|
|
37
|
-
<a
|
|
38
|
-
href="https://github.com/bigbinary/neeto-icons"
|
|
39
|
-
target="_blank"
|
|
40
|
-
rel="noreferrer"
|
|
41
|
-
className="flex items-center space-x-0.5 text-sm font-medium text-gray-600 hover:text-gray-900 mr-8"
|
|
42
|
-
>
|
|
43
|
-
<svg
|
|
44
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
45
|
-
width="18"
|
|
46
|
-
height="18"
|
|
47
|
-
viewBox="0 0 24 24"
|
|
48
|
-
>
|
|
49
|
-
<path fill="none" d="M0 0h24v24H0z"></path>
|
|
50
|
-
<path
|
|
51
|
-
fill="currentColor"
|
|
52
|
-
d="M12 2C6.475 2 2 6.475 2 12a9.994 9.994 0 006.838 9.488c.5.087.687-.213.687-.476 0-.237-.013-1.024-.013-1.862-2.512.463-3.162-.612-3.362-1.175-.113-.288-.6-1.175-1.025-1.413-.35-.187-.85-.65-.013-.662.788-.013 1.35.725 1.538 1.025.9 1.512 2.338 1.087 2.912.825.088-.65.35-1.087.638-1.337-2.225-.25-4.55-1.113-4.55-4.938 0-1.088.387-1.987 1.025-2.688-.1-.25-.45-1.275.1-2.65 0 0 .837-.262 2.75 1.026a9.28 9.28 0 012.5-.338c.85 0 1.7.112 2.5.337 1.912-1.3 2.75-1.024 2.75-1.024.55 1.375.2 2.4.1 2.65.637.7 1.025 1.587 1.025 2.687 0 3.838-2.337 4.688-4.562 4.938.362.312.675.912.675 1.85 0 1.337-.013 2.412-.013 2.75 0 .262.188.574.688.474A10.016 10.016 0 0022 12c0-5.525-4.475-10-10-10z"
|
|
53
|
-
></path>
|
|
54
|
-
</svg>
|
|
55
|
-
<span>Source</span>
|
|
56
|
-
</a>
|
|
57
|
-
</p>
|
|
58
|
-
<div className="grid grid-cols-4 gap-3 lg:grid-cols-8">
|
|
59
|
-
{iconset.iconList.map((icon) => {
|
|
60
|
-
const Component = iconset[icon];
|
|
61
|
-
return (
|
|
62
|
-
<div
|
|
63
|
-
key={icon}
|
|
64
|
-
className="flex flex-col items-center justify-center p-5 transition-colors rounded-lg cursor-pointer bg-gray-50 hover:bg-gray-100"
|
|
65
|
-
>
|
|
66
|
-
<Component />
|
|
67
|
-
<div className="mt-2 text-xs">{icon}</div>
|
|
68
|
-
</div>
|
|
69
|
-
);
|
|
70
|
-
})}
|
|
71
|
-
</div>
|
|
72
|
-
</div>
|
|
73
|
-
);
|
|
74
|
-
};
|
|
75
|
-
|
|
76
|
-
export const ApplicationIcons = () => {
|
|
77
|
-
return (
|
|
78
|
-
<div className="p-4">
|
|
79
|
-
<div className="table border-collapse">
|
|
80
|
-
<thead>
|
|
81
|
-
<tr>
|
|
82
|
-
<th className="p-4 text-left border border-gray-200"></th>
|
|
83
|
-
<th className="p-4 text-left border border-gray-200">Application</th>
|
|
84
|
-
<th className="p-4 text-left border border-gray-200">Gradient class</th>
|
|
85
|
-
<th className="p-4 text-left border border-gray-200">Icon</th>
|
|
86
|
-
</tr>
|
|
87
|
-
</thead>
|
|
88
|
-
<tbody>
|
|
89
|
-
{applications.map((application) => {
|
|
90
|
-
const Component = iconset[application];
|
|
91
|
-
return (
|
|
92
|
-
<tr className="">
|
|
93
|
-
<td className="p-4 text-center border border-gray-200">
|
|
94
|
-
<div
|
|
95
|
-
className={`w-8 h-8 rounded-md mb-3 flex flex-row items-center justify-center ${application
|
|
96
|
-
.toLocaleLowerCase()
|
|
97
|
-
.replace("neeto", "gradient--")}`}
|
|
98
|
-
>
|
|
99
|
-
<Component color="#fff" />
|
|
100
|
-
</div>
|
|
101
|
-
</td>
|
|
102
|
-
<td className="p-4 text-left border border-gray-200">
|
|
103
|
-
<b className="p-1 px-2 text-xs">{application}</b>
|
|
104
|
-
</td>
|
|
105
|
-
<td className="p-4 text-left border border-gray-200">
|
|
106
|
-
<code className="p-1 px-2 text-xs bg-gray-100 rounded">{`${application
|
|
107
|
-
.toLocaleLowerCase()
|
|
108
|
-
.replace("neeto", "gradient--")}`}</code>
|
|
109
|
-
</td>
|
|
110
|
-
<td className="p-4 text-left border border-gray-200">
|
|
111
|
-
<code className="p-1 px-2 text-xs bg-gray-100 rounded">{application}</code>
|
|
112
|
-
</td>
|
|
113
|
-
</tr>
|
|
114
|
-
);
|
|
115
|
-
})}
|
|
116
|
-
</tbody>
|
|
117
|
-
</div>
|
|
118
|
-
</div>
|
|
119
|
-
);
|
|
120
|
-
};
|
|
@@ -1,187 +0,0 @@
|
|
|
1
|
-
import React, { useState } from "react";
|
|
2
|
-
import { Search, Favorite } from "@bigbinary/neeto-icons";
|
|
3
|
-
|
|
4
|
-
import Input from "../lib/components/Input";
|
|
5
|
-
|
|
6
|
-
export default {
|
|
7
|
-
title: "Components/Input",
|
|
8
|
-
component: Input,
|
|
9
|
-
parameters: {
|
|
10
|
-
layout: "padded",
|
|
11
|
-
docs: {
|
|
12
|
-
description: {
|
|
13
|
-
component: '`import { Input } from "@bigbinary/neetoui/v2";`',
|
|
14
|
-
},
|
|
15
|
-
},
|
|
16
|
-
},
|
|
17
|
-
};
|
|
18
|
-
|
|
19
|
-
const Template = (args) => <Input {...args} />;
|
|
20
|
-
|
|
21
|
-
export const Normal = Template.bind({});
|
|
22
|
-
Normal.args = {
|
|
23
|
-
label: "Input",
|
|
24
|
-
placeholder: "Enter Name",
|
|
25
|
-
};
|
|
26
|
-
|
|
27
|
-
export const Controlled = () => {
|
|
28
|
-
const [value, setValue] = useState("BigBinary");
|
|
29
|
-
return (
|
|
30
|
-
<Input
|
|
31
|
-
label="Controlled Input"
|
|
32
|
-
value={value}
|
|
33
|
-
onChange={(e) => setValue(e.target.value)}
|
|
34
|
-
/>
|
|
35
|
-
);
|
|
36
|
-
};
|
|
37
|
-
|
|
38
|
-
export const Large = () => <Input label="Large Input" size="large" />;
|
|
39
|
-
|
|
40
|
-
export const Required = () => <Input label="Required Input" required={true} />;
|
|
41
|
-
|
|
42
|
-
export const Disabled = () => <Input label="Disabled Input" disabled={true} />;
|
|
43
|
-
|
|
44
|
-
export const SearchInputSmall = () => (
|
|
45
|
-
<Input label="Search" prefix={<Search size={16} />} suffix=".neetohelp.com" />
|
|
46
|
-
);
|
|
47
|
-
|
|
48
|
-
export const SearchInputLarge = () => (
|
|
49
|
-
<Input label="Search" size="large" prefix={<Search size={20} />} suffix=".neetohelp.com" />
|
|
50
|
-
);
|
|
51
|
-
|
|
52
|
-
export const Error = () => <Input label="Error" error="Provide valid email" />;
|
|
53
|
-
|
|
54
|
-
export const HelpText = () => (
|
|
55
|
-
<Input label="Name" helpText="This is help text props to the component." />
|
|
56
|
-
);
|
|
57
|
-
|
|
58
|
-
export const NakedInput = () => (
|
|
59
|
-
<Input label="Naked Input Field" nakedInput={true} />
|
|
60
|
-
);
|
|
61
|
-
|
|
62
|
-
export const AllVariants = () => {
|
|
63
|
-
const [input, setInput] = useState("Text");
|
|
64
|
-
return (
|
|
65
|
-
<div className="w-full">
|
|
66
|
-
<div className="p-6 space-y-6">
|
|
67
|
-
<div className="p-4 space-y-8 border border-indigo-500 border-dashed">
|
|
68
|
-
<h2 className="text-xl">Input/Small/Default</h2>
|
|
69
|
-
<div className="flex flex-row items-center justify-center space-x-8">
|
|
70
|
-
<Input placeholder="Input Placeholder" />
|
|
71
|
-
<Input
|
|
72
|
-
placeholder="Input Placeholder"
|
|
73
|
-
prefix={<Favorite size={16} />}
|
|
74
|
-
/>
|
|
75
|
-
<Input placeholder="Input Placeholder" />
|
|
76
|
-
<Input placeholder="Input Placeholder" />
|
|
77
|
-
</div>
|
|
78
|
-
<div className="flex flex-row items-center justify-center space-x-8">
|
|
79
|
-
<Input
|
|
80
|
-
placeholder="Input Placeholder"
|
|
81
|
-
onChange={(e) => setInput(e.target.value)}
|
|
82
|
-
value={input}
|
|
83
|
-
/>
|
|
84
|
-
<Input
|
|
85
|
-
placeholder="Input Placeholder"
|
|
86
|
-
onChange={(e) => setInput(e.target.value)}
|
|
87
|
-
prefix={<Favorite size={16} />}
|
|
88
|
-
value={input}
|
|
89
|
-
/>
|
|
90
|
-
<Input
|
|
91
|
-
placeholder="Input Placeholder"
|
|
92
|
-
onChange={(e) => setInput(e.target.value)}
|
|
93
|
-
value={input}
|
|
94
|
-
/>
|
|
95
|
-
<Input
|
|
96
|
-
placeholder="Input Placeholder"
|
|
97
|
-
onChange={(e) => setInput(e.target.value)}
|
|
98
|
-
value={input}
|
|
99
|
-
/>
|
|
100
|
-
</div>
|
|
101
|
-
<div className="flex flex-row items-center justify-center space-x-8">
|
|
102
|
-
<Input placeholder="Input Placeholder" disabled />
|
|
103
|
-
<Input
|
|
104
|
-
placeholder="Input Placeholder"
|
|
105
|
-
prefix={<Favorite size={16} />}
|
|
106
|
-
disabled
|
|
107
|
-
/>
|
|
108
|
-
<Input placeholder="Input Placeholder" disabled />
|
|
109
|
-
<Input placeholder="Input Placeholder" disabled />
|
|
110
|
-
</div>
|
|
111
|
-
<div className="flex flex-row items-center justify-center space-x-8">
|
|
112
|
-
<Input placeholder="Input Placeholder" error={true} />
|
|
113
|
-
<Input
|
|
114
|
-
placeholder="Input Placeholder"
|
|
115
|
-
prefix={<Favorite size={16} />}
|
|
116
|
-
error={true}
|
|
117
|
-
/>
|
|
118
|
-
<Input placeholder="Input Placeholder" error={true} />
|
|
119
|
-
<Input placeholder="Input Placeholder" error={true} />
|
|
120
|
-
</div>
|
|
121
|
-
</div>
|
|
122
|
-
<div className="p-4 space-y-8 border border-indigo-500 border-dashed">
|
|
123
|
-
<h2 className="text-xl">Input/Large</h2>
|
|
124
|
-
<div className="flex flex-row items-center justify-center space-x-8">
|
|
125
|
-
<Input placeholder="Input Placeholder" size="large" />
|
|
126
|
-
<Input
|
|
127
|
-
placeholder="Input Placeholder"
|
|
128
|
-
size="large"
|
|
129
|
-
prefix={<Favorite size={16} />}
|
|
130
|
-
/>
|
|
131
|
-
<Input placeholder="Input Placeholder" size="large" />
|
|
132
|
-
<Input placeholder="Input Placeholder" size="large" />
|
|
133
|
-
</div>
|
|
134
|
-
<div className="flex flex-row items-center justify-center space-x-8">
|
|
135
|
-
<Input
|
|
136
|
-
placeholder="Input Placeholder"
|
|
137
|
-
onChange={(e) => setInput(e.target.value)}
|
|
138
|
-
value={input}
|
|
139
|
-
size="large"
|
|
140
|
-
/>
|
|
141
|
-
<Input
|
|
142
|
-
placeholder="Input Placeholder"
|
|
143
|
-
onChange={(e) => setInput(e.target.value)}
|
|
144
|
-
size="large"
|
|
145
|
-
value={input}
|
|
146
|
-
prefix={<Favorite size={16} />}
|
|
147
|
-
/>
|
|
148
|
-
<Input
|
|
149
|
-
placeholder="Input Placeholder"
|
|
150
|
-
onChange={(e) => setInput(e.target.value)}
|
|
151
|
-
size="large"
|
|
152
|
-
value={input}
|
|
153
|
-
/>
|
|
154
|
-
<Input
|
|
155
|
-
placeholder="Input Placeholder"
|
|
156
|
-
onChange={(e) => setInput(e.target.value)}
|
|
157
|
-
size="large"
|
|
158
|
-
value={input}
|
|
159
|
-
/>
|
|
160
|
-
</div>
|
|
161
|
-
<div className="flex flex-row items-center justify-center space-x-8">
|
|
162
|
-
<Input placeholder="Input Placeholder" size="large" disabled />
|
|
163
|
-
<Input
|
|
164
|
-
placeholder="Input Placeholder"
|
|
165
|
-
size="large"
|
|
166
|
-
prefix={<Favorite size={16} />}
|
|
167
|
-
disabled
|
|
168
|
-
/>
|
|
169
|
-
<Input placeholder="Input Placeholder" size="large" disabled />
|
|
170
|
-
<Input placeholder="Input Placeholder" size="large" disabled />
|
|
171
|
-
</div>
|
|
172
|
-
<div className="flex flex-row items-center justify-center space-x-8">
|
|
173
|
-
<Input placeholder="Input Placeholder" size="large" error={true} />
|
|
174
|
-
<Input
|
|
175
|
-
placeholder="Input Placeholder"
|
|
176
|
-
size="large"
|
|
177
|
-
prefix={<Favorite size={16} />}
|
|
178
|
-
error={true}
|
|
179
|
-
/>
|
|
180
|
-
<Input placeholder="Input Placeholder" size="large" error={true} />
|
|
181
|
-
<Input placeholder="Input Placeholder" size="large" error={true} />
|
|
182
|
-
</div>
|
|
183
|
-
</div>
|
|
184
|
-
</div>
|
|
185
|
-
</div>
|
|
186
|
-
);
|
|
187
|
-
};
|
|
@@ -1,103 +0,0 @@
|
|
|
1
|
-
import { Meta } from "@storybook/addon-docs";
|
|
2
|
-
|
|
3
|
-
<Meta title="Introduction" />
|
|
4
|
-
|
|
5
|
-
<style>{`
|
|
6
|
-
.subheading {
|
|
7
|
-
--mediumdark: '#999999';
|
|
8
|
-
font-weight: 900;
|
|
9
|
-
font-size: 13px;
|
|
10
|
-
color: #999;
|
|
11
|
-
letter-spacing: 2px;
|
|
12
|
-
line-height: 24px;
|
|
13
|
-
text-transform: uppercase;
|
|
14
|
-
margin-bottom: 12px;
|
|
15
|
-
margin-top: 40px;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
.tip {
|
|
19
|
-
display: inline-block;
|
|
20
|
-
border-radius: 1em;
|
|
21
|
-
font-size: 11px;
|
|
22
|
-
line-height: 12px;
|
|
23
|
-
font-weight: 700;
|
|
24
|
-
background: #2f3941;
|
|
25
|
-
color: #fff;
|
|
26
|
-
padding: 4px 12px;
|
|
27
|
-
margin-right: 10px;
|
|
28
|
-
vertical-align: top;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
.tip-wrapper {
|
|
32
|
-
font-size: 13px;
|
|
33
|
-
line-height: 20px;
|
|
34
|
-
margin-top: 40px;
|
|
35
|
-
margin-bottom: 40px;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
.tip-wrapper code {
|
|
39
|
-
font-size: 12px;
|
|
40
|
-
display: inline-block;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
`}</style>
|
|
45
|
-
|
|
46
|
-
# What is NeetoUI?
|
|
47
|
-
|
|
48
|
-
NeetoUI is the library that drives the experience in all Neeto products built at BigBinary
|
|
49
|
-
|
|
50
|
-
<div className="subheading">Installation</div>
|
|
51
|
-
|
|
52
|
-
To install NeetoUI via yarn, use this command.
|
|
53
|
-
|
|
54
|
-
```
|
|
55
|
-
yarn add @bigbinary/neetoui
|
|
56
|
-
```
|
|
57
|
-
|
|
58
|
-
For other installation methods, refer our [**official npm page**](https://www.npmjs.com/package/@bigbinary/neetoui)
|
|
59
|
-
|
|
60
|
-
For more information, refer our [**GitHub repository**](https://github.com/bigbinary/neeto-ui)
|
|
61
|
-
|
|
62
|
-
<div className="tip-wrapper">
|
|
63
|
-
<span className="tip">
|
|
64
|
-
To use NeetoUI, you need a recent version of React.js installed (version
|
|
65
|
-
16.13.1+ recommended)
|
|
66
|
-
</span>
|
|
67
|
-
</div>
|
|
68
|
-
|
|
69
|
-
<div className="subheading">Basic Usage</div>
|
|
70
|
-
|
|
71
|
-
##### Importing
|
|
72
|
-
|
|
73
|
-
NeetoUI exports all it’s component as named exports. You can individually import necessary components in the following way:
|
|
74
|
-
|
|
75
|
-
```
|
|
76
|
-
import { Button, Tooltip, } from "@bigbinary/neetoui/v2";
|
|
77
|
-
```
|
|
78
|
-
|
|
79
|
-
If you need access to an object that contains references to all the components you can do a wildcard import. This way, you can render dynamic components from NeetoUI.
|
|
80
|
-
|
|
81
|
-
```
|
|
82
|
-
import React from "react";
|
|
83
|
-
import * as NeetoUI from "@bigbinary/neetoui/v2";
|
|
84
|
-
|
|
85
|
-
export default function index() {
|
|
86
|
-
const Button = NeetoUI.Button;
|
|
87
|
-
|
|
88
|
-
// get a random component
|
|
89
|
-
const componentName = Math.random() > 0.5 ? "Badge" : "Avatar";
|
|
90
|
-
const MyDynamicComponent = NeetoUI[componentName];
|
|
91
|
-
|
|
92
|
-
return (
|
|
93
|
-
<div>
|
|
94
|
-
<Button />
|
|
95
|
-
<MyDynamicComponent />
|
|
96
|
-
</div>
|
|
97
|
-
);
|
|
98
|
-
}
|
|
99
|
-
```
|
|
100
|
-
|
|
101
|
-
#### Acceptable props for Components
|
|
102
|
-
|
|
103
|
-
Refer documentation of each component for a detailed list of available props and their usage.
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
|
|
3
|
-
import Label from "../lib/components/Label";
|
|
4
|
-
|
|
5
|
-
export default {
|
|
6
|
-
title: "Components/Label",
|
|
7
|
-
component: Label,
|
|
8
|
-
parameters: {
|
|
9
|
-
layout: "padded",
|
|
10
|
-
docs: {
|
|
11
|
-
description: {
|
|
12
|
-
component: '`import { Label } from "@bigbinary/neetoui/v2";`',
|
|
13
|
-
},
|
|
14
|
-
},
|
|
15
|
-
},
|
|
16
|
-
};
|
|
17
|
-
|
|
18
|
-
const Template = ({ children, ...args }) => <Label {...args}>{children}</Label>;
|
|
19
|
-
|
|
20
|
-
export const Basic = Template.bind({});
|
|
21
|
-
Basic.args = {
|
|
22
|
-
children: "This is a basic label",
|
|
23
|
-
};
|
|
24
|
-
|
|
25
|
-
export const Required = Template.bind({});
|
|
26
|
-
Required.args = {
|
|
27
|
-
children: "This is a required label",
|
|
28
|
-
required: true,
|
|
29
|
-
};
|