trepur_components 0.1.2 → 0.1.6
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/.babelrc +14 -0
- package/babel.config.js +4 -0
- package/dist/Components/Breadcrumbs/Breadcrumbs.stories.js +9 -5
- package/dist/Components/Breadcrumbs/README.md +0 -1
- package/dist/Components/Breadcrumbs/index.js +16 -8
- package/dist/Components/BreadcrumbsBordered/BreadcrumbsBordered.stories.js +11 -82
- package/dist/Components/BreadcrumbsBordered/README.md +0 -1
- package/dist/Components/BreadcrumbsBordered/index.css +67 -0
- package/dist/Components/BreadcrumbsBordered/index.js +16 -8
- package/dist/Components/Button/Button.stories.js +28 -24
- package/dist/Components/Button/README.md +0 -1
- package/dist/Components/Button/{Button.js → index.js} +13 -13
- package/dist/Components/ButtonSlide/ButtonSlide.stories.js +28 -24
- package/dist/Components/ButtonSlide/README.md +0 -1
- package/dist/Components/ButtonSlide/index.js +37 -0
- package/dist/Components/Card/Card.stories.js +32 -28
- package/dist/Components/Card/README.md +0 -1
- package/dist/Components/Card/{Card.js → index.js} +32 -30
- package/dist/Components/CardImageLink/CardImageLink.stories.js +20 -16
- package/dist/Components/CardImageLink/{CardImageLink.js → index.js} +10 -10
- package/dist/Components/CardImageLinkList/CardImageLinkList.stories.js +11 -7
- package/dist/Components/CardImageLinkList/{CardImageLinkList.js → index.js} +10 -8
- package/dist/Components/CardList/CardList.stories.js +14 -161
- package/dist/Components/CardList/README.md +0 -1
- package/dist/Components/CardList/{CardList.js → index.js} +11 -7
- package/dist/Components/Icon/Icon.stories.js +18 -14
- package/dist/Components/Icon/README.md +0 -1
- package/dist/Components/Icon/{Icon.js → index.js} +8 -8
- package/dist/Components/Jumbotron/Jumbotron.stories.js +18 -14
- package/dist/Components/Jumbotron/{Jumbotron.js → index.js} +13 -13
- package/dist/Components/Nav/Nav.stories.js +112 -0
- package/dist/Components/Nav/README.md +0 -0
- package/dist/Components/{Nav.js → Nav/index.js} +67 -26
- package/dist/Components/Profile/Profile.stories.js +50 -0
- package/dist/Components/Profile/README.md +0 -0
- package/dist/Components/Profile/index.js +82 -0
- package/dist/Components/Search/README.md +0 -0
- package/dist/Components/Search/Search.stories.js +76 -0
- package/dist/Components/{Search.js → Search/index.js} +16 -14
- package/dist/Components/SignedInLinks/README.md +0 -0
- package/dist/Components/SignedInLinks/SignedInLinks.stories.js +52 -0
- package/dist/Components/{SignedInLinks.js → SignedInLinks/index.js} +9 -5
- package/dist/Components/SignedOutLinks/README.md +0 -0
- package/dist/Components/SignedOutLinks/SignedOutLinks.stories.js +52 -0
- package/dist/Components/SignedOutLinks/index.js +31 -0
- package/dist/index.css +1 -64
- package/dist/index.js +31 -1
- package/package.json +2 -1
- package/src/Components/CardList/CardList.stories.js +1 -163
- package/babel.config.json +0 -18
- package/dist/Components/ButtonSlide/ButtonSlide.js +0 -37
- package/dist/Components/Profile.js +0 -41
- package/dist/Components/SignedOutLinks.js +0 -22
package/.babelrc
ADDED
package/babel.config.js
ADDED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
require("core-js/modules/es.object.define-property.js");
|
|
4
|
+
|
|
3
5
|
Object.defineProperty(exports, "__esModule", {
|
|
4
6
|
value: true
|
|
5
7
|
});
|
|
@@ -17,7 +19,7 @@ require("../../index.css");
|
|
|
17
19
|
|
|
18
20
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
19
21
|
|
|
20
|
-
|
|
22
|
+
var links = [{
|
|
21
23
|
link: '/',
|
|
22
24
|
name: 'link 1'
|
|
23
25
|
}, {
|
|
@@ -69,9 +71,11 @@ var _default = {
|
|
|
69
71
|
}
|
|
70
72
|
}
|
|
71
73
|
},
|
|
72
|
-
decorators: [
|
|
73
|
-
|
|
74
|
-
|
|
74
|
+
decorators: [function (story) {
|
|
75
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
76
|
+
className: "p-4"
|
|
77
|
+
}, story());
|
|
78
|
+
}],
|
|
75
79
|
parameters: {
|
|
76
80
|
readme: {
|
|
77
81
|
sidebar: _README.default
|
|
@@ -80,7 +84,7 @@ var _default = {
|
|
|
80
84
|
};
|
|
81
85
|
exports.default = _default;
|
|
82
86
|
|
|
83
|
-
|
|
87
|
+
var _Breadcrumbs = function _Breadcrumbs(args) {
|
|
84
88
|
return /*#__PURE__*/_react.default.createElement(_index.default, {
|
|
85
89
|
links: links
|
|
86
90
|
});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
hello this is an icon
|
|
@@ -1,20 +1,28 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
require("core-js/modules/es.object.define-property.js");
|
|
4
|
+
|
|
3
5
|
Object.defineProperty(exports, "__esModule", {
|
|
4
6
|
value: true
|
|
5
7
|
});
|
|
6
8
|
exports.default = void 0;
|
|
7
9
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
10
|
+
require("core-js/modules/es.object.keys.js");
|
|
11
|
+
|
|
12
|
+
require("core-js/modules/es.array.map.js");
|
|
13
|
+
|
|
14
|
+
require("core-js/modules/es.function.name.js");
|
|
15
|
+
|
|
16
|
+
require("core-js/modules/es.string.link.js");
|
|
17
|
+
|
|
18
|
+
var Breadcrumbs = function Breadcrumbs(_ref) {
|
|
19
|
+
var className = _ref.className,
|
|
20
|
+
links = _ref.links;
|
|
21
|
+
var linksLength = Object.keys(links).length;
|
|
22
|
+
var classes = className + ' flex py-2 px-8 ';
|
|
15
23
|
return /*#__PURE__*/React.createElement("ul", {
|
|
16
24
|
className: classes
|
|
17
|
-
}, links && links.map((link, i)
|
|
25
|
+
}, links && links.map(function (link, i) {
|
|
18
26
|
return /*#__PURE__*/React.createElement("div", {
|
|
19
27
|
key: link.name
|
|
20
28
|
}, /*#__PURE__*/React.createElement("li", null, /*#__PURE__*/React.createElement("div", {
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
require("core-js/modules/es.object.define-property.js");
|
|
4
|
+
|
|
3
5
|
Object.defineProperty(exports, "__esModule", {
|
|
4
6
|
value: true
|
|
5
7
|
});
|
|
@@ -11,11 +13,11 @@ var _README = _interopRequireDefault(require("./README.md"));
|
|
|
11
13
|
|
|
12
14
|
var _index = _interopRequireDefault(require("./index"));
|
|
13
15
|
|
|
14
|
-
require("
|
|
16
|
+
require("./index.css");
|
|
15
17
|
|
|
16
18
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
17
19
|
|
|
18
|
-
|
|
20
|
+
var links = [{
|
|
19
21
|
link: '/',
|
|
20
22
|
name: 'link 1'
|
|
21
23
|
}, {
|
|
@@ -67,9 +69,11 @@ var _default = {
|
|
|
67
69
|
}
|
|
68
70
|
}
|
|
69
71
|
},
|
|
70
|
-
decorators: [
|
|
71
|
-
|
|
72
|
-
|
|
72
|
+
decorators: [function (story) {
|
|
73
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
74
|
+
className: "p-4"
|
|
75
|
+
}, story());
|
|
76
|
+
}],
|
|
73
77
|
parameters: {
|
|
74
78
|
readme: {
|
|
75
79
|
sidebar: _README.default
|
|
@@ -78,85 +82,10 @@ var _default = {
|
|
|
78
82
|
};
|
|
79
83
|
exports.default = _default;
|
|
80
84
|
|
|
81
|
-
|
|
85
|
+
var _Breadcrumbs = function _Breadcrumbs(args) {
|
|
82
86
|
return /*#__PURE__*/_react.default.createElement(_index.default, {
|
|
83
87
|
links: links
|
|
84
88
|
});
|
|
85
|
-
};
|
|
86
|
-
// return (
|
|
87
|
-
// <Button ctaText='I am a button'>
|
|
88
|
-
// </Button>
|
|
89
|
-
// )
|
|
90
|
-
// }
|
|
91
|
-
// export const WithIconRight = () => {
|
|
92
|
-
// return (
|
|
93
|
-
// <Button rightIcon='thumbs-up' ctaText='I am a button'>
|
|
94
|
-
// </Button>
|
|
95
|
-
// )
|
|
96
|
-
// }
|
|
97
|
-
// WithIconRight.story = {
|
|
98
|
-
// name: 'With Icon (right)',
|
|
99
|
-
// }
|
|
100
|
-
// export const WithIconLeft = () => {
|
|
101
|
-
// return (
|
|
102
|
-
// <Button leftIcon='sign-in' ctaText='I am a button'>
|
|
103
|
-
// </Button>
|
|
104
|
-
// )
|
|
105
|
-
// }
|
|
106
|
-
// WithIconLeft.story = {
|
|
107
|
-
// name: 'With Icon (left)',
|
|
108
|
-
// }
|
|
109
|
-
// export const WithBothIcons = () => {
|
|
110
|
-
// return (
|
|
111
|
-
// <Button leftIcon='star' rightIcon='star' ctaText='I am a button'>
|
|
112
|
-
// </Button>
|
|
113
|
-
// )
|
|
114
|
-
// }
|
|
115
|
-
// export const ButtonAsExternalLink = () => {
|
|
116
|
-
// return (
|
|
117
|
-
// <Button as='a-external' ctaText='I am a button'>
|
|
118
|
-
// </Button>
|
|
119
|
-
// )
|
|
120
|
-
// }
|
|
121
|
-
// ButtonAsExternalLink.story = {
|
|
122
|
-
// name: 'Button as external link',
|
|
123
|
-
// }
|
|
124
|
-
// export const ButtonAsSemanticHtmlButton = () => {
|
|
125
|
-
// return (
|
|
126
|
-
// <Button as='button' htmlType='button' ctaText='I am a button' url='/'>
|
|
127
|
-
// </Button>
|
|
128
|
-
// )
|
|
129
|
-
// }
|
|
130
|
-
// ButtonAsSemanticHtmlButton.story = {
|
|
131
|
-
// name: 'Button as semantic html button',
|
|
132
|
-
// }
|
|
133
|
-
// export const ButtonAsSemanticHtmlSubmitButton = () => {
|
|
134
|
-
// return (
|
|
135
|
-
// <Button as='button' htmlType='submit' ctaText='I am a button'>
|
|
136
|
-
// </Button>
|
|
137
|
-
// )
|
|
138
|
-
// }
|
|
139
|
-
// ButtonAsSemanticHtmlSubmitButton.story = {
|
|
140
|
-
// name: 'Button as semantic html submit button',
|
|
141
|
-
// }
|
|
142
|
-
// export const ButtonAsInternalLink = () => {
|
|
143
|
-
// return (
|
|
144
|
-
// <Button as='Link' ctaText='I am a button' url='/'>
|
|
145
|
-
// </Button>
|
|
146
|
-
// )
|
|
147
|
-
// }
|
|
148
|
-
// ButtonAsInternalLink.story = {
|
|
149
|
-
// name: 'Button as internal link',
|
|
150
|
-
// }
|
|
151
|
-
// export const WithOnClickMethod = () => {
|
|
152
|
-
// return (
|
|
153
|
-
// <Button ctaText='I am a button' onClick={action('button-click')}>
|
|
154
|
-
// </Button>
|
|
155
|
-
// )
|
|
156
|
-
// }
|
|
157
|
-
// WithOnClickMethod.story = {
|
|
158
|
-
// name: 'With onClick method',
|
|
159
|
-
// }
|
|
160
|
-
|
|
89
|
+
};
|
|
161
90
|
|
|
162
91
|
exports._Breadcrumbs = _Breadcrumbs;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
hello this is an icon
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
@tailwind base;
|
|
2
|
+
@tailwind components;
|
|
3
|
+
@tailwind utilities;
|
|
4
|
+
@import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.css');
|
|
5
|
+
|
|
6
|
+
.right-arrow {
|
|
7
|
+
@apply w-0;
|
|
8
|
+
@apply h-0;
|
|
9
|
+
border-top: 17px solid transparent;
|
|
10
|
+
border-bottom: 17px solid transparent;
|
|
11
|
+
border-left: 15px solid theme('colors.brand-border');
|
|
12
|
+
@apply absolute;
|
|
13
|
+
right: -15px;
|
|
14
|
+
@apply top-0;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.let-arrow {
|
|
18
|
+
@apply w-0;
|
|
19
|
+
@apply h-0;
|
|
20
|
+
border-top: 17px solid transparent;
|
|
21
|
+
border-bottom: 17px solid transparent;
|
|
22
|
+
border-left: 17px solid theme('colors.white');
|
|
23
|
+
@apply absolute;
|
|
24
|
+
left: 0px;
|
|
25
|
+
@apply top-0;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.test-arrow {
|
|
29
|
+
@apply w-0;
|
|
30
|
+
@apply h-0;
|
|
31
|
+
border-top: 17px solid transparent;
|
|
32
|
+
border-bottom: 17px solid transparent;
|
|
33
|
+
border-left: 15px solid theme('colors.brand-border');
|
|
34
|
+
@apply absolute;
|
|
35
|
+
left: -8px;
|
|
36
|
+
bottom: -11px;
|
|
37
|
+
transform: rotate(48deg);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.test-arrow-top {
|
|
41
|
+
@apply w-0;
|
|
42
|
+
@apply h-0;
|
|
43
|
+
border-top: 15px solid theme('colors.brand-border');
|
|
44
|
+
border-bottom: 17px solid transparent;
|
|
45
|
+
border-left: 17px solid transparent;
|
|
46
|
+
@apply absolute;
|
|
47
|
+
left: -17px;
|
|
48
|
+
top: 0px;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.voucherCode__btn {
|
|
52
|
+
@apply relative;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.voucherCode__btn:hover .right-arrow {
|
|
56
|
+
border-left-color: theme('colors.brand-primary');
|
|
57
|
+
}
|
|
58
|
+
.voucherCode__btn:hover .test-arrow {
|
|
59
|
+
border-left-color: theme('colors.brand-primary');
|
|
60
|
+
}
|
|
61
|
+
.voucherCode__btn:hover .test-arrow-top {
|
|
62
|
+
border-top-color: theme('colors.brand-primary');
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.voucherCode__code:focus {
|
|
66
|
+
@apply border-0;
|
|
67
|
+
}
|
|
@@ -1,20 +1,28 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
require("core-js/modules/es.object.define-property.js");
|
|
4
|
+
|
|
3
5
|
Object.defineProperty(exports, "__esModule", {
|
|
4
6
|
value: true
|
|
5
7
|
});
|
|
6
8
|
exports.default = void 0;
|
|
7
9
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
10
|
+
require("core-js/modules/es.object.keys.js");
|
|
11
|
+
|
|
12
|
+
require("core-js/modules/es.array.map.js");
|
|
13
|
+
|
|
14
|
+
require("core-js/modules/es.function.name.js");
|
|
15
|
+
|
|
16
|
+
require("core-js/modules/es.string.link.js");
|
|
17
|
+
|
|
18
|
+
var Breadcrumbs = function Breadcrumbs(_ref) {
|
|
19
|
+
var className = _ref.className,
|
|
20
|
+
links = _ref.links;
|
|
21
|
+
var linksLength = Object.keys(links).length;
|
|
22
|
+
var classes = 'flex py-2 px-8 ' + className;
|
|
15
23
|
return /*#__PURE__*/React.createElement("ul", {
|
|
16
24
|
className: classes
|
|
17
|
-
}, links && links.map((link, i)
|
|
25
|
+
}, links && links.map(function (link, i) {
|
|
18
26
|
return /*#__PURE__*/React.createElement("div", {
|
|
19
27
|
key: link.name
|
|
20
28
|
}, /*#__PURE__*/React.createElement("li", null, /*#__PURE__*/React.createElement("div", {
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
require("core-js/modules/es.object.define-property.js");
|
|
4
|
+
|
|
3
5
|
Object.defineProperty(exports, "__esModule", {
|
|
4
6
|
value: true
|
|
5
7
|
});
|
|
@@ -11,7 +13,7 @@ var _addonActions = require("@storybook/addon-actions");
|
|
|
11
13
|
|
|
12
14
|
var _README = _interopRequireDefault(require("./README.md"));
|
|
13
15
|
|
|
14
|
-
var
|
|
16
|
+
var _index = _interopRequireDefault(require("./index"));
|
|
15
17
|
|
|
16
18
|
require("../../index.css");
|
|
17
19
|
|
|
@@ -59,9 +61,11 @@ var _default = {
|
|
|
59
61
|
}
|
|
60
62
|
}
|
|
61
63
|
},
|
|
62
|
-
decorators: [
|
|
63
|
-
|
|
64
|
-
|
|
64
|
+
decorators: [function (story) {
|
|
65
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
66
|
+
className: "p-4"
|
|
67
|
+
}, story());
|
|
68
|
+
}],
|
|
65
69
|
parameters: {
|
|
66
70
|
readme: {
|
|
67
71
|
sidebar: _README.default
|
|
@@ -70,24 +74,24 @@ var _default = {
|
|
|
70
74
|
};
|
|
71
75
|
exports.default = _default;
|
|
72
76
|
|
|
73
|
-
|
|
74
|
-
return /*#__PURE__*/_react.default.createElement(
|
|
77
|
+
var _Button = function _Button(args) {
|
|
78
|
+
return /*#__PURE__*/_react.default.createElement(_index.default, {
|
|
75
79
|
ctaText: "I am a button"
|
|
76
80
|
});
|
|
77
81
|
};
|
|
78
82
|
|
|
79
83
|
exports._Button = _Button;
|
|
80
84
|
|
|
81
|
-
|
|
82
|
-
return /*#__PURE__*/_react.default.createElement(
|
|
85
|
+
var SecondaryButton = function SecondaryButton() {
|
|
86
|
+
return /*#__PURE__*/_react.default.createElement(_index.default, {
|
|
83
87
|
ctaText: "I am a button"
|
|
84
88
|
});
|
|
85
89
|
};
|
|
86
90
|
|
|
87
91
|
exports.SecondaryButton = SecondaryButton;
|
|
88
92
|
|
|
89
|
-
|
|
90
|
-
return /*#__PURE__*/_react.default.createElement(
|
|
93
|
+
var WithIconRight = function WithIconRight() {
|
|
94
|
+
return /*#__PURE__*/_react.default.createElement(_index.default, {
|
|
91
95
|
rightIcon: "thumbs-up",
|
|
92
96
|
ctaText: "I am a button"
|
|
93
97
|
});
|
|
@@ -98,8 +102,8 @@ WithIconRight.story = {
|
|
|
98
102
|
name: 'With Icon (right)'
|
|
99
103
|
};
|
|
100
104
|
|
|
101
|
-
|
|
102
|
-
return /*#__PURE__*/_react.default.createElement(
|
|
105
|
+
var WithIconLeft = function WithIconLeft() {
|
|
106
|
+
return /*#__PURE__*/_react.default.createElement(_index.default, {
|
|
103
107
|
leftIcon: "sign-in",
|
|
104
108
|
ctaText: "I am a button"
|
|
105
109
|
});
|
|
@@ -110,8 +114,8 @@ WithIconLeft.story = {
|
|
|
110
114
|
name: 'With Icon (left)'
|
|
111
115
|
};
|
|
112
116
|
|
|
113
|
-
|
|
114
|
-
return /*#__PURE__*/_react.default.createElement(
|
|
117
|
+
var WithBothIcons = function WithBothIcons() {
|
|
118
|
+
return /*#__PURE__*/_react.default.createElement(_index.default, {
|
|
115
119
|
leftIcon: "star",
|
|
116
120
|
rightIcon: "star",
|
|
117
121
|
ctaText: "I am a button"
|
|
@@ -120,8 +124,8 @@ const WithBothIcons = () => {
|
|
|
120
124
|
|
|
121
125
|
exports.WithBothIcons = WithBothIcons;
|
|
122
126
|
|
|
123
|
-
|
|
124
|
-
return /*#__PURE__*/_react.default.createElement(
|
|
127
|
+
var ButtonAsExternalLink = function ButtonAsExternalLink() {
|
|
128
|
+
return /*#__PURE__*/_react.default.createElement(_index.default, {
|
|
125
129
|
as: "a-external",
|
|
126
130
|
ctaText: "I am a button"
|
|
127
131
|
});
|
|
@@ -132,8 +136,8 @@ ButtonAsExternalLink.story = {
|
|
|
132
136
|
name: 'Button as external link'
|
|
133
137
|
};
|
|
134
138
|
|
|
135
|
-
|
|
136
|
-
return /*#__PURE__*/_react.default.createElement(
|
|
139
|
+
var ButtonAsSemanticHtmlButton = function ButtonAsSemanticHtmlButton() {
|
|
140
|
+
return /*#__PURE__*/_react.default.createElement(_index.default, {
|
|
137
141
|
as: "button",
|
|
138
142
|
htmlType: "button",
|
|
139
143
|
ctaText: "I am a button",
|
|
@@ -146,8 +150,8 @@ ButtonAsSemanticHtmlButton.story = {
|
|
|
146
150
|
name: 'Button as semantic html button'
|
|
147
151
|
};
|
|
148
152
|
|
|
149
|
-
|
|
150
|
-
return /*#__PURE__*/_react.default.createElement(
|
|
153
|
+
var ButtonAsSemanticHtmlSubmitButton = function ButtonAsSemanticHtmlSubmitButton() {
|
|
154
|
+
return /*#__PURE__*/_react.default.createElement(_index.default, {
|
|
151
155
|
as: "button",
|
|
152
156
|
htmlType: "submit",
|
|
153
157
|
ctaText: "I am a button"
|
|
@@ -159,8 +163,8 @@ ButtonAsSemanticHtmlSubmitButton.story = {
|
|
|
159
163
|
name: 'Button as semantic html submit button'
|
|
160
164
|
};
|
|
161
165
|
|
|
162
|
-
|
|
163
|
-
return /*#__PURE__*/_react.default.createElement(
|
|
166
|
+
var ButtonAsInternalLink = function ButtonAsInternalLink() {
|
|
167
|
+
return /*#__PURE__*/_react.default.createElement(_index.default, {
|
|
164
168
|
as: "Link",
|
|
165
169
|
ctaText: "I am a button",
|
|
166
170
|
url: "/"
|
|
@@ -172,8 +176,8 @@ ButtonAsInternalLink.story = {
|
|
|
172
176
|
name: 'Button as internal link'
|
|
173
177
|
};
|
|
174
178
|
|
|
175
|
-
|
|
176
|
-
return /*#__PURE__*/_react.default.createElement(
|
|
179
|
+
var WithOnClickMethod = function WithOnClickMethod() {
|
|
180
|
+
return /*#__PURE__*/_react.default.createElement(_index.default, {
|
|
177
181
|
ctaText: "I am a button",
|
|
178
182
|
onClick: (0, _addonActions.action)('button-click')
|
|
179
183
|
});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
hello this is an icon
|
|
@@ -1,28 +1,28 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
require("core-js/modules/es.object.define-property.js");
|
|
4
|
+
|
|
3
5
|
Object.defineProperty(exports, "__esModule", {
|
|
4
6
|
value: true
|
|
5
7
|
});
|
|
6
8
|
exports.default = void 0;
|
|
7
9
|
|
|
8
|
-
var
|
|
10
|
+
var _index = _interopRequireDefault(require("../Icon/index"));
|
|
9
11
|
|
|
10
12
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
11
13
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
let classes = className + ' py-2 px-8 rounded-lg text-black border-2 border-black border-gray-300 bg-white hover:bg-red hover:text-black transition-background-color duration-500 transform';
|
|
22
|
-
let iconLeft = /*#__PURE__*/React.createElement(_Icon.default, {
|
|
14
|
+
var Button = function Button(_ref) {
|
|
15
|
+
var ctaText = _ref.ctaText,
|
|
16
|
+
ctaLink = _ref.ctaLink,
|
|
17
|
+
className = _ref.className,
|
|
18
|
+
onClick = _ref.onClick,
|
|
19
|
+
leftIcon = _ref.leftIcon,
|
|
20
|
+
rightIcon = _ref.rightIcon;
|
|
21
|
+
var classes = className + ' py-2 px-8 rounded-lg text-black border-2 border-black border-gray-300 bg-white hover:bg-red hover:text-black transition-background-color duration-500 transform';
|
|
22
|
+
var iconLeft = /*#__PURE__*/React.createElement(_index.default, {
|
|
23
23
|
type: leftIcon
|
|
24
24
|
});
|
|
25
|
-
|
|
25
|
+
var iconRight = /*#__PURE__*/React.createElement(_index.default, {
|
|
26
26
|
type: rightIcon
|
|
27
27
|
});
|
|
28
28
|
return /*#__PURE__*/React.createElement("button", {
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
require("core-js/modules/es.object.define-property.js");
|
|
4
|
+
|
|
3
5
|
Object.defineProperty(exports, "__esModule", {
|
|
4
6
|
value: true
|
|
5
7
|
});
|
|
@@ -11,7 +13,7 @@ var _addonActions = require("@storybook/addon-actions");
|
|
|
11
13
|
|
|
12
14
|
var _README = _interopRequireDefault(require("./README.md"));
|
|
13
15
|
|
|
14
|
-
var
|
|
16
|
+
var _index = _interopRequireDefault(require("./index"));
|
|
15
17
|
|
|
16
18
|
require("../../index.css");
|
|
17
19
|
|
|
@@ -59,9 +61,11 @@ var _default = {
|
|
|
59
61
|
}
|
|
60
62
|
}
|
|
61
63
|
},
|
|
62
|
-
decorators: [
|
|
63
|
-
|
|
64
|
-
|
|
64
|
+
decorators: [function (story) {
|
|
65
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
66
|
+
className: "p-4"
|
|
67
|
+
}, story());
|
|
68
|
+
}],
|
|
65
69
|
parameters: {
|
|
66
70
|
readme: {
|
|
67
71
|
sidebar: _README.default
|
|
@@ -70,24 +74,24 @@ var _default = {
|
|
|
70
74
|
};
|
|
71
75
|
exports.default = _default;
|
|
72
76
|
|
|
73
|
-
|
|
74
|
-
return /*#__PURE__*/_react.default.createElement(
|
|
77
|
+
var _Button = function _Button(args) {
|
|
78
|
+
return /*#__PURE__*/_react.default.createElement(_index.default, {
|
|
75
79
|
ctaText: "READ MORE"
|
|
76
80
|
});
|
|
77
81
|
};
|
|
78
82
|
|
|
79
83
|
exports._Button = _Button;
|
|
80
84
|
|
|
81
|
-
|
|
82
|
-
return /*#__PURE__*/_react.default.createElement(
|
|
85
|
+
var SecondaryButton = function SecondaryButton() {
|
|
86
|
+
return /*#__PURE__*/_react.default.createElement(_index.default, {
|
|
83
87
|
ctaText: "I am a button"
|
|
84
88
|
});
|
|
85
89
|
};
|
|
86
90
|
|
|
87
91
|
exports.SecondaryButton = SecondaryButton;
|
|
88
92
|
|
|
89
|
-
|
|
90
|
-
return /*#__PURE__*/_react.default.createElement(
|
|
93
|
+
var WithIconRight = function WithIconRight() {
|
|
94
|
+
return /*#__PURE__*/_react.default.createElement(_index.default, {
|
|
91
95
|
rightIcon: "thumbs-up",
|
|
92
96
|
ctaText: "I am a button"
|
|
93
97
|
});
|
|
@@ -98,8 +102,8 @@ WithIconRight.story = {
|
|
|
98
102
|
name: 'With Icon (right)'
|
|
99
103
|
};
|
|
100
104
|
|
|
101
|
-
|
|
102
|
-
return /*#__PURE__*/_react.default.createElement(
|
|
105
|
+
var WithIconLeft = function WithIconLeft() {
|
|
106
|
+
return /*#__PURE__*/_react.default.createElement(_index.default, {
|
|
103
107
|
leftIcon: "sign-in",
|
|
104
108
|
ctaText: "I am a button"
|
|
105
109
|
});
|
|
@@ -110,8 +114,8 @@ WithIconLeft.story = {
|
|
|
110
114
|
name: 'With Icon (left)'
|
|
111
115
|
};
|
|
112
116
|
|
|
113
|
-
|
|
114
|
-
return /*#__PURE__*/_react.default.createElement(
|
|
117
|
+
var WithBothIcons = function WithBothIcons() {
|
|
118
|
+
return /*#__PURE__*/_react.default.createElement(_index.default, {
|
|
115
119
|
leftIcon: "star",
|
|
116
120
|
rightIcon: "star",
|
|
117
121
|
ctaText: "I am a button"
|
|
@@ -120,8 +124,8 @@ const WithBothIcons = () => {
|
|
|
120
124
|
|
|
121
125
|
exports.WithBothIcons = WithBothIcons;
|
|
122
126
|
|
|
123
|
-
|
|
124
|
-
return /*#__PURE__*/_react.default.createElement(
|
|
127
|
+
var ButtonAsExternalLink = function ButtonAsExternalLink() {
|
|
128
|
+
return /*#__PURE__*/_react.default.createElement(_index.default, {
|
|
125
129
|
as: "a-external",
|
|
126
130
|
ctaText: "I am a button"
|
|
127
131
|
});
|
|
@@ -132,8 +136,8 @@ ButtonAsExternalLink.story = {
|
|
|
132
136
|
name: 'Button as external link'
|
|
133
137
|
};
|
|
134
138
|
|
|
135
|
-
|
|
136
|
-
return /*#__PURE__*/_react.default.createElement(
|
|
139
|
+
var ButtonAsSemanticHtmlButton = function ButtonAsSemanticHtmlButton() {
|
|
140
|
+
return /*#__PURE__*/_react.default.createElement(_index.default, {
|
|
137
141
|
as: "button",
|
|
138
142
|
htmlType: "button",
|
|
139
143
|
ctaText: "I am a button",
|
|
@@ -146,8 +150,8 @@ ButtonAsSemanticHtmlButton.story = {
|
|
|
146
150
|
name: 'Button as semantic html button'
|
|
147
151
|
};
|
|
148
152
|
|
|
149
|
-
|
|
150
|
-
return /*#__PURE__*/_react.default.createElement(
|
|
153
|
+
var ButtonAsSemanticHtmlSubmitButton = function ButtonAsSemanticHtmlSubmitButton() {
|
|
154
|
+
return /*#__PURE__*/_react.default.createElement(_index.default, {
|
|
151
155
|
as: "button",
|
|
152
156
|
htmlType: "submit",
|
|
153
157
|
ctaText: "I am a button"
|
|
@@ -159,8 +163,8 @@ ButtonAsSemanticHtmlSubmitButton.story = {
|
|
|
159
163
|
name: 'Button as semantic html submit button'
|
|
160
164
|
};
|
|
161
165
|
|
|
162
|
-
|
|
163
|
-
return /*#__PURE__*/_react.default.createElement(
|
|
166
|
+
var ButtonAsInternalLink = function ButtonAsInternalLink() {
|
|
167
|
+
return /*#__PURE__*/_react.default.createElement(_index.default, {
|
|
164
168
|
as: "Link",
|
|
165
169
|
ctaText: "I am a button",
|
|
166
170
|
url: "/"
|
|
@@ -172,8 +176,8 @@ ButtonAsInternalLink.story = {
|
|
|
172
176
|
name: 'Button as internal link'
|
|
173
177
|
};
|
|
174
178
|
|
|
175
|
-
|
|
176
|
-
return /*#__PURE__*/_react.default.createElement(
|
|
179
|
+
var WithOnClickMethod = function WithOnClickMethod() {
|
|
180
|
+
return /*#__PURE__*/_react.default.createElement(_index.default, {
|
|
177
181
|
ctaText: "I am a button",
|
|
178
182
|
onClick: (0, _addonActions.action)('button-click')
|
|
179
183
|
});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
hello this is an icon
|