@rabbitio/ui-kit 1.0.0-alpha.1

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.
@@ -0,0 +1,77 @@
1
+ /** @type { import('@storybook/react-webpack5').StorybookConfig } */
2
+ const config = {
3
+ stories: [
4
+ "../stories/**/*.mdx",
5
+ "../stories/**/*.stories.@(js|jsx|mjs|ts|tsx)",
6
+ ],
7
+ addons: [
8
+ "@storybook/addon-links",
9
+ "@storybook/addon-essentials",
10
+ "@storybook/addon-onboarding",
11
+ "@storybook/addon-interactions",
12
+ "@storybook/addon-viewport",
13
+ "@storybook/addon-actions",
14
+ {
15
+ name: "@storybook/addon-styling-webpack",
16
+ options: {
17
+ rules: [
18
+ {
19
+ test: /\.css$/,
20
+ sideEffects: true,
21
+ use: [
22
+ require.resolve("style-loader"),
23
+ {
24
+ loader: require.resolve("css-loader"),
25
+ options: {
26
+ // Want to add more CSS Modules options? Read more here: https://github.com/webpack-contrib/css-loader#modules
27
+ modules: {
28
+ auto: true,
29
+ },
30
+ },
31
+ },
32
+ ],
33
+ },
34
+ {
35
+ test: /\.s[ac]ss$/,
36
+ sideEffects: true,
37
+ use: [
38
+ require.resolve("style-loader"),
39
+ {
40
+ loader: require.resolve("css-loader"),
41
+ options: {
42
+ // Want to add more CSS Modules options? Read more here: https://github.com/webpack-contrib/css-loader#modules
43
+ modules: {
44
+ auto: true,
45
+ },
46
+ importLoaders: 2,
47
+ },
48
+ },
49
+ require.resolve("resolve-url-loader"),
50
+ {
51
+ loader: require.resolve("sass-loader"),
52
+ options: {
53
+ // Want to add more Sass options? Read more here: https://webpack.js.org/loaders/sass-loader/#options
54
+ implementation: require.resolve("sass"),
55
+ sourceMap: true,
56
+ sassOptions: {},
57
+ },
58
+ },
59
+ ],
60
+ },
61
+ ],
62
+ },
63
+ },
64
+ ],
65
+ framework: {
66
+ name: "@storybook/react-webpack5",
67
+ options: {
68
+ builder: {
69
+ useSWC: true,
70
+ },
71
+ },
72
+ },
73
+ docs: {
74
+ autodocs: "tag",
75
+ },
76
+ };
77
+ export default config;
@@ -0,0 +1,51 @@
1
+ import {
2
+ INITIAL_VIEWPORTS,
3
+ MINIMAL_VIEWPORTS,
4
+ } from "@storybook/addon-viewport";
5
+
6
+ // $wide-desktop-width: 1279.98px;
7
+ // $desktop-width: 1199.98px;
8
+ // $laptop-width: 991.98px;
9
+ // $tablet-width: 767.98px;
10
+ // $phone-width: 575.98px;
11
+ // $extra-small: 358.98px;
12
+
13
+ const customViewPorts = {
14
+ // wideDesktop: {
15
+ // name: 'wide-desktop',
16
+ // styles: {
17
+ // width: '1279.98px',
18
+ // height: '963px',
19
+ // },
20
+ // },
21
+ };
22
+ /** @type { import('@storybook/react').Preview } */
23
+ const preview = {
24
+ parameters: {
25
+ actions: { argTypesRegex: "^on[A-Z].*" },
26
+ controls: {
27
+ matchers: {
28
+ color: /(background|color)$/i,
29
+ date: /Date$/i,
30
+ },
31
+ },
32
+ layout: "centered",
33
+ viewport: {
34
+ viewports: {
35
+ ...customViewPorts,
36
+ ...MINIMAL_VIEWPORTS,
37
+ ...INITIAL_VIEWPORTS,
38
+ },
39
+ defaultViewport: "reset",
40
+ },
41
+ backgrounds: {
42
+ default: "light",
43
+ values: [
44
+ { name: "dark", value: "#232d42" },
45
+ { name: "light", value: "#ffffff" },
46
+ ],
47
+ },
48
+ },
49
+ };
50
+
51
+ export default preview;
package/Dockerfile ADDED
@@ -0,0 +1,20 @@
1
+ # Use an official Node runtime as a base image
2
+ FROM node:16
3
+
4
+ # Set the working directory inside the container
5
+ WORKDIR /app
6
+
7
+ # Copy package.json and package-lock.json to the working directory
8
+ COPY package*.json ./
9
+
10
+ # Install app dependencies
11
+ RUN npm install
12
+
13
+ # Copy the rest of the application code to the working directory
14
+ COPY . .
15
+
16
+ # Expose the port that Storybook will run on
17
+ EXPOSE 6006
18
+
19
+ # Run Storybook when the container launches
20
+ CMD ["npm", "run", "storybook", "-p", "6006"]
package/README.md ADDED
@@ -0,0 +1,31 @@
1
+ # Installation
2
+ 1. run
3
+ ~~~
4
+ npm install --save @rabbitio/ui-kit
5
+ ~~~
6
+
7
+ # Using library
8
+ 1. To use components just import them
9
+ ~~~
10
+ import { Button } from "@rabbitio/ui-kit";
11
+ ~~~
12
+ 2. Also, you should always import base styles into your scss index file:
13
+ ~~~
14
+ @import "@rabbitio/ui-kit/styles/index";
15
+ ~~~
16
+
17
+ # Adding new component
18
+ 1. Add a directory for component under the semantically corresponding subdirectory inside **./stories**
19
+ 2. Under the component directory implement 3 files: **<Component>.js**, **<Component>.module.scss**, **<Component>.stories.js**
20
+ 3. Add the implemented component import to barrel file **./stories/index.js**
21
+ ~~~
22
+ export { default as <Component> } from "./path/to/<Component>";
23
+ ~~~
24
+
25
+ # Running storybook
26
+ ~~~
27
+ sudo docker build -t storybook-app .
28
+ ~~~
29
+ ~~~
30
+ sudo docker run -d -p 6006:6006 storybook-app
31
+ ~~~
package/index.js ADDED
@@ -0,0 +1 @@
1
+ export * from "./stories";
package/package.json ADDED
@@ -0,0 +1,55 @@
1
+ {
2
+ "name": "@rabbitio/ui-kit",
3
+ "version": "1.0.0-alpha.1",
4
+ "description": "Rabbit.io react.js components kit",
5
+ "main": "index.js",
6
+ "scripts": {
7
+ "storybook": "storybook dev -p 6006",
8
+ "build-storybook": "storybook build"
9
+ },
10
+ "keywords": [
11
+ "rabbit.io",
12
+ "rabbitio",
13
+ "react",
14
+ "scss",
15
+ "ui-kit"
16
+ ],
17
+ "repository": {
18
+ "type": "git",
19
+ "url": "https://gitlab.com/rabbitio/ui-kit.git"
20
+ },
21
+ "author": "admin@rabbit.io",
22
+ "license": "MIT",
23
+ "dependencies": {
24
+ "react": "17.0.2",
25
+ "react-dom": "17.0.2",
26
+ "react-router-dom": "6.21.1"
27
+ },
28
+ "devDependencies": {
29
+ "@storybook/addon-actions": "^7.6.6",
30
+ "@storybook/addon-backgrounds": "^7.6.6",
31
+ "@storybook/addon-essentials": "^7.6.6",
32
+ "@storybook/addon-interactions": "^7.6.6",
33
+ "@storybook/addon-links": "^7.6.6",
34
+ "@storybook/addon-onboarding": "^1.0.10",
35
+ "@storybook/addon-styling-webpack": "^0.0.5",
36
+ "@storybook/addon-viewport": "^7.6.6",
37
+ "@storybook/blocks": "^7.6.6",
38
+ "@storybook/react": "^7.6.6",
39
+ "@storybook/react-webpack5": "^7.6.6",
40
+ "@storybook/test": "^7.6.6",
41
+ "css-loader": "^6.8.1",
42
+ "node-sass": "^7.0.3",
43
+ "prop-types": "^15.8.1",
44
+ "resolve-url-loader": "^5.0.0",
45
+ "sass": "^1.69.5",
46
+ "sass-loader": "^13.3.3",
47
+ "storybook": "^7.6.6",
48
+ "style-loader": "^3.3.3"
49
+ },
50
+ "prettier": {
51
+ "trailingComma": "es5",
52
+ "tabWidth": 4,
53
+ "singleQuote": false
54
+ }
55
+ }
@@ -0,0 +1,7 @@
1
+ <svg width="24" height="25" viewBox="0 0 24 25" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M19.4926 15.7679V18.5068C19.4926 19.2507 18.8422 19.8534 18.04 19.8534H5.45266C4.65042 19.8534 4 19.2507 4 18.5068V5.84658C4 5.10268 4.65042 4.5 5.45266 4.5H18.04C18.8422 4.5 19.4926 5.10268 19.4926 5.84658V8.92496" stroke="white" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
3
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M20.1958 15.4383H15.9518C14.1789 15.4383 12.7422 14.0016 12.7422 12.2287C12.7422 10.4558 14.1789 9.01904 15.9518 9.01904H20.1958C20.6639 9.01904 21.0431 9.39829 21.0431 9.86637V14.5904C21.0431 15.0591 20.6639 15.4383 20.1958 15.4383Z" stroke="white" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
4
+ <path d="M4 7.25582H8.04903" stroke="white" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
5
+ <path d="M4 17.1181H8.04903" stroke="white" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
6
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M17.1414 12.2284C17.1414 12.778 16.6958 13.2229 16.1469 13.2229C15.5972 13.2229 15.1523 12.778 15.1523 12.2284C15.1523 11.6794 15.5972 11.2339 16.1469 11.2339C16.6958 11.2339 17.1414 11.6794 17.1414 12.2284Z" fill="white"/>
7
+ </svg>
@@ -0,0 +1,59 @@
1
+ import React from "react";
2
+ import PropTypes from "prop-types";
3
+
4
+ import styles from "./LoadingDots.module.scss";
5
+
6
+ /**
7
+ * LoadingDots Component - Displays a loading animation with dots.
8
+ * This component allows customization of size, color, margins, and alignment.
9
+ *
10
+ * @component
11
+ * @param {Object} props - The props of the component.
12
+ * @param {('big'|'small'|'extra-small')} [props.size='small'] - Sets the size of the loading dots.
13
+ * @param {boolean} [props.isColored=false] - If true, the dots will be colored, otherwise they will be monochrome.
14
+ * @param {boolean} [props.noMargins=false] - If true, removes the margins around the loading dots.
15
+ * @param {(boolean|'left'|'right')} [props.align=false] - Aligns the loading dots to the left or right if specified, otherwise centered.
16
+ * @returns {React.ReactElement} A React component that renders the loading dots animation.
17
+ */
18
+ const LoadingDots = ({
19
+ size = "small",
20
+ isColored = false,
21
+ noMargins = false,
22
+ align = false,
23
+ }) => {
24
+ return (
25
+ <div
26
+ className={`${styles["loading-dots"]} ${styles[size]} ${
27
+ noMargins ? ` ${styles["no-margins"]}` : ""
28
+ } ${align ? styles["align-" + align] : ""}`}
29
+ >
30
+ <div
31
+ className={`${styles.dot} ${
32
+ isColored ? ` ${styles.colored}` : ""
33
+ }`}
34
+ />
35
+ <div
36
+ className={`${styles.dot} ${
37
+ isColored ? ` ${styles.colored}` : ""
38
+ }`}
39
+ />
40
+ <div
41
+ className={`${styles.dot} ${
42
+ isColored ? ` ${styles.colored}` : ""
43
+ }`}
44
+ />
45
+ </div>
46
+ );
47
+ };
48
+
49
+ LoadingDots.propTypes = {
50
+ size: PropTypes.oneOf(["big", "small", "extra-small"]),
51
+ isColored: PropTypes.bool,
52
+ noMargins: PropTypes.bool,
53
+ align: PropTypes.oneOfType([
54
+ PropTypes.oneOf(["left", "right"]),
55
+ PropTypes.bool,
56
+ ]),
57
+ };
58
+
59
+ export default LoadingDots;
@@ -0,0 +1,83 @@
1
+ @import "../../../styles/index";
2
+
3
+ .loading-dots {
4
+ display: flex;
5
+ align-items: center;
6
+ justify-content: center;
7
+ margin: 0 auto;
8
+
9
+ &.no-margins {
10
+ margin: 0 !important;
11
+ }
12
+
13
+ .dot {
14
+ border-radius: 50%;
15
+ background: $white;
16
+
17
+ &.colored {
18
+ background: SolidColor(tosca);
19
+ }
20
+
21
+ animation: 0.5s ease-in-out 0s alternate infinite dots;
22
+
23
+ &:nth-child(2) {
24
+ animation-delay: 0.2s;
25
+ }
26
+
27
+ &:nth-child(3) {
28
+ animation-delay: 0.4s;
29
+ }
30
+ }
31
+
32
+ &.big {
33
+ .dot {
34
+ width: 24px;
35
+ height: 24px;
36
+
37
+ @media (max-width: $phone-width) {
38
+ width: 14px;
39
+ height: 14px;
40
+ }
41
+
42
+ &:nth-child(2) {
43
+ @extend .mx-3;
44
+ }
45
+ }
46
+ }
47
+
48
+ &.small {
49
+ .dot {
50
+ width: 14px;
51
+ height: 14px;
52
+ }
53
+ }
54
+
55
+ &.extra-small {
56
+ .dot {
57
+ width: 8px;
58
+ height: 8px;
59
+ }
60
+ }
61
+
62
+ &.align-left {
63
+ justify-content: flex-start;
64
+ margin: 0;
65
+ }
66
+
67
+ &.align-right {
68
+ justify-content: flex-end;
69
+ margin: 0;
70
+ }
71
+ }
72
+
73
+ @keyframes dots {
74
+ 0% {
75
+ transform: scale(1);
76
+ opacity: 1;
77
+ }
78
+
79
+ 100% {
80
+ transform: scale(0.45);
81
+ opacity: 0.6;
82
+ }
83
+ }
@@ -0,0 +1,46 @@
1
+ import React from "react";
2
+ import LoadingDots from "./LoadingDots";
3
+
4
+ export default {
5
+ title: "LoadingDots",
6
+ component: LoadingDots,
7
+ parameters: {
8
+ backgrounds: {
9
+ default: "dark",
10
+ },
11
+ },
12
+ argTypes: {
13
+ size: {
14
+ control: {
15
+ type: "select",
16
+ options: ["big", "small", "extra-small"],
17
+ },
18
+ },
19
+ align: {
20
+ control: { type: "select", options: ["left", "right", false] },
21
+ },
22
+ isColored: { control: { type: "boolean" } },
23
+ noMargins: { control: { type: "boolean" } },
24
+ },
25
+ tags: ["autodocs"],
26
+ };
27
+
28
+ const Template = (args) => <LoadingDots {...args} />;
29
+
30
+ export const Default = Template.bind({});
31
+ Default.args = {};
32
+
33
+ export const Colored = Template.bind({});
34
+ Colored.args = {
35
+ isColored: true,
36
+ };
37
+
38
+ export const NoMargins = Template.bind({});
39
+ NoMargins.args = {
40
+ noMargins: true,
41
+ };
42
+
43
+ export const AlignRight = Template.bind({});
44
+ AlignRight.args = {
45
+ align: "right",
46
+ };
@@ -0,0 +1,237 @@
1
+ import React, { useEffect, useRef, useState } from "react";
2
+ import { Link } from "react-router-dom";
3
+ import PropTypes from "prop-types";
4
+
5
+ import styles from "./Button.module.scss";
6
+
7
+ import LoadingDots from "../../LoadingDots/LoadingDots";
8
+
9
+ /**
10
+ * Button component - A versatile and customizable button for React applications.
11
+ * It supports various sizes, styles, and functionalities, including loaders, icons, and handling of click events.
12
+ * This component can also be used as a link when integrated with `react-router-dom`.
13
+ *
14
+ * @component
15
+ * @param {Object} props
16
+ * @param {('xl'|'lg'|'md'|'sm')} [props.size='xl'] - Sets the size of the button.
17
+ * @param {string} [props.className=''] - An optional custom CSS class name for additional styling.
18
+ * @param {string} [props.mode='transparent'] - Determines the button's visual style.
19
+ * @param {Function} [props.onClick=(resetButtonLoader, event) => {}] - Callback function that triggers on button click.
20
+ * @param {boolean} [props.loader=true] - If true, displays a loader animation on the button when clicked.
21
+ * @param {boolean} [props.loading=false] - Controls the actual display of the loader if `loader` is true.
22
+ * @param {string} [props.to=''] - The path for the button to act as a link.
23
+ * @param {boolean} [props.fullWidthOnMobiles=false] - Expands the button to full width on mobiles.
24
+ * @param {boolean} [props.fullWidthOnTablets=false] - Expands the button to full width on tablets.
25
+ * @param {string} [props.icon=''] - The path to the button's icon.
26
+ * @param {React.ReactNode} [props.content=''] - The text or content displayed inside the button.
27
+ * @param {boolean} [props.isDisabled=false] - Disables the button if true.
28
+ * @param {Function} [props.setClickTrigger=(p) => {}] - Function to programmatically trigger a button click.
29
+ * @param {boolean} [props.isFormSubmittingButton=false] - If true, adds a hidden `<input type="submit">`.
30
+ * @param {boolean} [props.bigIcon=false] - If true, displays a larger icon on the button.
31
+ * @param {boolean} [props.checkmarkOnClick=false] - Shows a checkmark instead of content for a few seconds after click.
32
+ * @param {boolean} [props.propagatePrimaryButtonClick=true] - Propagates the primary button click event if true.
33
+ * @param {boolean} [props.smallPaddingOnSmallMobiles=false] - Enables smaller paddings for extra-small screen sizes.
34
+ * @param {Function} [props.handleError=(func) => func()] - Function to handle errors during button click events.
35
+ * @returns {React.ReactElement}
36
+ */
37
+ const Button = ({
38
+ size = "xl",
39
+ className = "",
40
+ mode = "transparent",
41
+ onClick = (resetButtonLoader, event) => {},
42
+ loader = true,
43
+ loading = false,
44
+ to = "",
45
+ fullWidthOnMobiles = false,
46
+ fullWidthOnTablets = false,
47
+ icon = "",
48
+ content = "",
49
+ isDisabled = false,
50
+ setClickTrigger = (p) => {},
51
+ isFormSubmittingButton = false,
52
+ bigIcon = false,
53
+ checkmarkOnClick = false,
54
+ propagatePrimaryButtonClick = true,
55
+ smallPaddingOnSmallMobiles = false,
56
+ handleError = (func, event) => func(event),
57
+ }) => {
58
+ const [isLoading, setIsLoading] = useState(loading);
59
+ const [isCheckShown, setIsCheckShown] = useState(false);
60
+ const [event, setEvent] = useState(null);
61
+
62
+ const buttonRef = useRef();
63
+
64
+ useEffect(() => {
65
+ setClickTrigger(() => buttonRef.current.click());
66
+ // eslint-disable-next-line react-hooks/exhaustive-deps
67
+ }, [buttonRef]);
68
+
69
+ useEffect(() => {
70
+ if (isLoading) {
71
+ onClick(() => setIsLoading(false), event);
72
+ }
73
+ // eslint-disable-next-line react-hooks/exhaustive-deps
74
+ }, [isLoading]);
75
+
76
+ const buttonClick = (e) => {
77
+ if (isLoading || isDisabled) {
78
+ return false;
79
+ }
80
+
81
+ if (checkmarkOnClick && !isCheckShown && !loader && !loading) {
82
+ setIsCheckShown(true);
83
+ setTimeout(() => {
84
+ setIsCheckShown(false);
85
+ }, 2000);
86
+ }
87
+
88
+ e.persist(); // Persisting React's SyntheticEvent to be able to use it in any async context
89
+ !propagatePrimaryButtonClick && e.stopPropagation();
90
+ if (loader) {
91
+ setIsLoading(true);
92
+ setEvent(e);
93
+ } else {
94
+ onClick(() => setIsLoading(false), e);
95
+ }
96
+ };
97
+
98
+ const classNames =
99
+ `${styles.button} ${styles[size]} ${styles[className]} ${styles[mode]}` +
100
+ (fullWidthOnMobiles ? ` ${styles["full-width-on-mobiles"]}` : "") +
101
+ (fullWidthOnTablets ? ` ${styles["full-width-on-tablets"]}` : "") +
102
+ (isDisabled ? ` ${styles.disable}` : "") +
103
+ (smallPaddingOnSmallMobiles
104
+ ? ` ${styles["small-padding-on-small-mobiles"]}`
105
+ : "");
106
+
107
+ return (
108
+ <>
109
+ {isFormSubmittingButton ? <input type="submit" hidden /> : null}
110
+ {to ? (
111
+ <Link
112
+ className={classNames}
113
+ onClick={(e) => handleError(buttonClick, e)}
114
+ to={to}
115
+ innerRef={buttonRef}
116
+ >
117
+ {icon ? (
118
+ <div
119
+ className={
120
+ styles["button-with-icon"] +
121
+ (bigIcon ? ` ${styles["big-icon"]}` : "")
122
+ }
123
+ >
124
+ <img src={icon} alt="button icon" />
125
+ <span className={styles["button-with-icon-text"]}>
126
+ {content}
127
+ </span>
128
+ </div>
129
+ ) : (
130
+ content
131
+ )}
132
+ </Link>
133
+ ) : (
134
+ <div
135
+ className={classNames}
136
+ onClick={(e) => handleError(buttonClick, e)}
137
+ ref={buttonRef}
138
+ >
139
+ <div
140
+ className={`${styles["button-primary-dots-wrapper"]} ${
141
+ isLoading && loader ? styles.show : ""
142
+ }`}
143
+ >
144
+ {loader && isLoading ? (
145
+ <LoadingDots isColored={mode === "white"} />
146
+ ) : null}
147
+ </div>
148
+ <div
149
+ className={`${styles["button-success-icon"]} ${
150
+ styles[mode]
151
+ } ${isCheckShown ? styles["show"] : ""}`}
152
+ ></div>
153
+ {icon ? (
154
+ <div
155
+ className={`${styles["button-with-icon"]} ${
156
+ (isLoading && loader) ||
157
+ (checkmarkOnClick && isCheckShown)
158
+ ? styles["hide"]
159
+ : ""
160
+ } ${bigIcon ? styles["big-icon"] : ""}`}
161
+ >
162
+ <img src={icon} alt="button icon" />
163
+ <span className={styles["button-with-icon-text"]}>
164
+ {content}
165
+ </span>
166
+ </div>
167
+ ) : (
168
+ <span
169
+ className={`${styles["button-text"]} ${
170
+ (isLoading && loader) ||
171
+ (checkmarkOnClick && isCheckShown)
172
+ ? styles["hide"]
173
+ : ""
174
+ }`}
175
+ >
176
+ {content}
177
+ </span>
178
+ )}
179
+ </div>
180
+ )}
181
+ </>
182
+ );
183
+ };
184
+
185
+ Button.propTypes = {
186
+ size: PropTypes.oneOf(["xl", "lg", "md", "sm"]),
187
+ className: PropTypes.string,
188
+ mode: PropTypes.oneOf([
189
+ "transparent",
190
+ "white",
191
+ "primary",
192
+ "primary-bordered",
193
+ "primary-transparent",
194
+ "transparent-bordered",
195
+ "transparent-without-shadow",
196
+ ]),
197
+ onClick: PropTypes.func,
198
+ loader: PropTypes.bool,
199
+ loading: PropTypes.bool,
200
+ to: PropTypes.string,
201
+ fullWidthOnMobiles: PropTypes.bool,
202
+ fullWidthOnTablets: PropTypes.bool,
203
+ icon: PropTypes.string,
204
+ content: PropTypes.node,
205
+ isDisabled: PropTypes.bool,
206
+ setClickTrigger: PropTypes.func,
207
+ isFormSubmittingButton: PropTypes.bool,
208
+ bigIcon: PropTypes.bool,
209
+ checkmarkOnClick: PropTypes.bool,
210
+ propagatePrimaryButtonClick: PropTypes.bool,
211
+ smallPaddingOnSmallMobiles: PropTypes.bool,
212
+ handleError: PropTypes.func,
213
+ };
214
+
215
+ Button.defaultProps = {
216
+ size: "xl",
217
+ className: "",
218
+ mode: "transparent",
219
+ onClick: (resetButtonLoader, event) => {},
220
+ loader: true,
221
+ loading: false,
222
+ to: "",
223
+ fullWidthOnMobiles: false,
224
+ fullWidthOnTablets: false,
225
+ icon: "",
226
+ content: "",
227
+ isDisabled: false,
228
+ setClickTrigger: (p) => {},
229
+ isFormSubmittingButton: false,
230
+ bigIcon: false,
231
+ checkmarkOnClick: false,
232
+ propagatePrimaryButtonClick: true,
233
+ smallPaddingOnSmallMobiles: false,
234
+ handleError: (func) => func(),
235
+ };
236
+
237
+ export default Button;