trepur_components 0.1.5 → 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/dist/Components/Breadcrumbs/Breadcrumbs.stories.js +9 -5
- package/dist/Components/Breadcrumbs/index.js +16 -8
- package/dist/Components/BreadcrumbsBordered/BreadcrumbsBordered.stories.js +9 -5
- package/dist/Components/BreadcrumbsBordered/index.js +16 -8
- package/dist/Components/Button/Button.stories.js +17 -13
- package/dist/Components/Button/index.js +12 -12
- package/dist/Components/ButtonSlide/ButtonSlide.stories.js +17 -13
- package/dist/Components/ButtonSlide/index.js +12 -12
- package/dist/Components/Card/Card.stories.js +20 -16
- package/dist/Components/Card/index.js +28 -26
- package/dist/Components/CardImageLink/CardImageLink.stories.js +14 -10
- package/dist/Components/CardImageLink/index.js +10 -10
- package/dist/Components/CardImageLinkList/CardImageLinkList.stories.js +9 -5
- package/dist/Components/CardImageLinkList/index.js +8 -6
- package/dist/Components/CardList/CardList.stories.js +9 -5
- package/dist/Components/CardList/index.js +9 -5
- package/dist/Components/Icon/Icon.stories.js +12 -8
- package/dist/Components/Icon/index.js +8 -8
- package/dist/Components/Jumbotron/Jumbotron.stories.js +12 -8
- package/dist/Components/Jumbotron/index.js +10 -10
- package/dist/Components/Nav/Nav.stories.js +13 -9
- package/dist/Components/Nav/index.js +62 -21
- package/dist/Components/Profile/Profile.stories.js +9 -5
- package/dist/Components/Profile/index.js +49 -8
- package/dist/Components/Search/Search.stories.js +12 -8
- package/dist/Components/Search/index.js +13 -11
- package/dist/Components/SignedInLinks/SignedInLinks.stories.js +9 -5
- package/dist/Components/SignedInLinks/index.js +9 -5
- package/dist/Components/SignedOutLinks/SignedOutLinks.stories.js +9 -5
- package/dist/Components/SignedOutLinks/index.js +9 -5
- package/dist/index.js +31 -1
- package/package.json +1 -1
|
@@ -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,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
|
});
|
|
@@ -15,7 +17,7 @@ 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,7 +82,7 @@ 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
|
});
|
|
@@ -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
|
});
|
|
@@ -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,7 +74,7 @@ var _default = {
|
|
|
70
74
|
};
|
|
71
75
|
exports.default = _default;
|
|
72
76
|
|
|
73
|
-
|
|
77
|
+
var _Button = function _Button(args) {
|
|
74
78
|
return /*#__PURE__*/_react.default.createElement(_index.default, {
|
|
75
79
|
ctaText: "I am a button"
|
|
76
80
|
});
|
|
@@ -78,7 +82,7 @@ const _Button = args => {
|
|
|
78
82
|
|
|
79
83
|
exports._Button = _Button;
|
|
80
84
|
|
|
81
|
-
|
|
85
|
+
var SecondaryButton = function SecondaryButton() {
|
|
82
86
|
return /*#__PURE__*/_react.default.createElement(_index.default, {
|
|
83
87
|
ctaText: "I am a button"
|
|
84
88
|
});
|
|
@@ -86,7 +90,7 @@ const SecondaryButton = () => {
|
|
|
86
90
|
|
|
87
91
|
exports.SecondaryButton = SecondaryButton;
|
|
88
92
|
|
|
89
|
-
|
|
93
|
+
var WithIconRight = function WithIconRight() {
|
|
90
94
|
return /*#__PURE__*/_react.default.createElement(_index.default, {
|
|
91
95
|
rightIcon: "thumbs-up",
|
|
92
96
|
ctaText: "I am a button"
|
|
@@ -98,7 +102,7 @@ WithIconRight.story = {
|
|
|
98
102
|
name: 'With Icon (right)'
|
|
99
103
|
};
|
|
100
104
|
|
|
101
|
-
|
|
105
|
+
var WithIconLeft = function WithIconLeft() {
|
|
102
106
|
return /*#__PURE__*/_react.default.createElement(_index.default, {
|
|
103
107
|
leftIcon: "sign-in",
|
|
104
108
|
ctaText: "I am a button"
|
|
@@ -110,7 +114,7 @@ WithIconLeft.story = {
|
|
|
110
114
|
name: 'With Icon (left)'
|
|
111
115
|
};
|
|
112
116
|
|
|
113
|
-
|
|
117
|
+
var WithBothIcons = function WithBothIcons() {
|
|
114
118
|
return /*#__PURE__*/_react.default.createElement(_index.default, {
|
|
115
119
|
leftIcon: "star",
|
|
116
120
|
rightIcon: "star",
|
|
@@ -120,7 +124,7 @@ const WithBothIcons = () => {
|
|
|
120
124
|
|
|
121
125
|
exports.WithBothIcons = WithBothIcons;
|
|
122
126
|
|
|
123
|
-
|
|
127
|
+
var ButtonAsExternalLink = function ButtonAsExternalLink() {
|
|
124
128
|
return /*#__PURE__*/_react.default.createElement(_index.default, {
|
|
125
129
|
as: "a-external",
|
|
126
130
|
ctaText: "I am a button"
|
|
@@ -132,7 +136,7 @@ ButtonAsExternalLink.story = {
|
|
|
132
136
|
name: 'Button as external link'
|
|
133
137
|
};
|
|
134
138
|
|
|
135
|
-
|
|
139
|
+
var ButtonAsSemanticHtmlButton = function ButtonAsSemanticHtmlButton() {
|
|
136
140
|
return /*#__PURE__*/_react.default.createElement(_index.default, {
|
|
137
141
|
as: "button",
|
|
138
142
|
htmlType: "button",
|
|
@@ -146,7 +150,7 @@ ButtonAsSemanticHtmlButton.story = {
|
|
|
146
150
|
name: 'Button as semantic html button'
|
|
147
151
|
};
|
|
148
152
|
|
|
149
|
-
|
|
153
|
+
var ButtonAsSemanticHtmlSubmitButton = function ButtonAsSemanticHtmlSubmitButton() {
|
|
150
154
|
return /*#__PURE__*/_react.default.createElement(_index.default, {
|
|
151
155
|
as: "button",
|
|
152
156
|
htmlType: "submit",
|
|
@@ -159,7 +163,7 @@ ButtonAsSemanticHtmlSubmitButton.story = {
|
|
|
159
163
|
name: 'Button as semantic html submit button'
|
|
160
164
|
};
|
|
161
165
|
|
|
162
|
-
|
|
166
|
+
var ButtonAsInternalLink = function ButtonAsInternalLink() {
|
|
163
167
|
return /*#__PURE__*/_react.default.createElement(_index.default, {
|
|
164
168
|
as: "Link",
|
|
165
169
|
ctaText: "I am a button",
|
|
@@ -172,7 +176,7 @@ ButtonAsInternalLink.story = {
|
|
|
172
176
|
name: 'Button as internal link'
|
|
173
177
|
};
|
|
174
178
|
|
|
175
|
-
|
|
179
|
+
var WithOnClickMethod = function WithOnClickMethod() {
|
|
176
180
|
return /*#__PURE__*/_react.default.createElement(_index.default, {
|
|
177
181
|
ctaText: "I am a button",
|
|
178
182
|
onClick: (0, _addonActions.action)('button-click')
|
|
@@ -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
|
});
|
|
@@ -9,20 +11,18 @@ 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(_index.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
|
});
|
|
@@ -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,7 +74,7 @@ var _default = {
|
|
|
70
74
|
};
|
|
71
75
|
exports.default = _default;
|
|
72
76
|
|
|
73
|
-
|
|
77
|
+
var _Button = function _Button(args) {
|
|
74
78
|
return /*#__PURE__*/_react.default.createElement(_index.default, {
|
|
75
79
|
ctaText: "READ MORE"
|
|
76
80
|
});
|
|
@@ -78,7 +82,7 @@ const _Button = args => {
|
|
|
78
82
|
|
|
79
83
|
exports._Button = _Button;
|
|
80
84
|
|
|
81
|
-
|
|
85
|
+
var SecondaryButton = function SecondaryButton() {
|
|
82
86
|
return /*#__PURE__*/_react.default.createElement(_index.default, {
|
|
83
87
|
ctaText: "I am a button"
|
|
84
88
|
});
|
|
@@ -86,7 +90,7 @@ const SecondaryButton = () => {
|
|
|
86
90
|
|
|
87
91
|
exports.SecondaryButton = SecondaryButton;
|
|
88
92
|
|
|
89
|
-
|
|
93
|
+
var WithIconRight = function WithIconRight() {
|
|
90
94
|
return /*#__PURE__*/_react.default.createElement(_index.default, {
|
|
91
95
|
rightIcon: "thumbs-up",
|
|
92
96
|
ctaText: "I am a button"
|
|
@@ -98,7 +102,7 @@ WithIconRight.story = {
|
|
|
98
102
|
name: 'With Icon (right)'
|
|
99
103
|
};
|
|
100
104
|
|
|
101
|
-
|
|
105
|
+
var WithIconLeft = function WithIconLeft() {
|
|
102
106
|
return /*#__PURE__*/_react.default.createElement(_index.default, {
|
|
103
107
|
leftIcon: "sign-in",
|
|
104
108
|
ctaText: "I am a button"
|
|
@@ -110,7 +114,7 @@ WithIconLeft.story = {
|
|
|
110
114
|
name: 'With Icon (left)'
|
|
111
115
|
};
|
|
112
116
|
|
|
113
|
-
|
|
117
|
+
var WithBothIcons = function WithBothIcons() {
|
|
114
118
|
return /*#__PURE__*/_react.default.createElement(_index.default, {
|
|
115
119
|
leftIcon: "star",
|
|
116
120
|
rightIcon: "star",
|
|
@@ -120,7 +124,7 @@ const WithBothIcons = () => {
|
|
|
120
124
|
|
|
121
125
|
exports.WithBothIcons = WithBothIcons;
|
|
122
126
|
|
|
123
|
-
|
|
127
|
+
var ButtonAsExternalLink = function ButtonAsExternalLink() {
|
|
124
128
|
return /*#__PURE__*/_react.default.createElement(_index.default, {
|
|
125
129
|
as: "a-external",
|
|
126
130
|
ctaText: "I am a button"
|
|
@@ -132,7 +136,7 @@ ButtonAsExternalLink.story = {
|
|
|
132
136
|
name: 'Button as external link'
|
|
133
137
|
};
|
|
134
138
|
|
|
135
|
-
|
|
139
|
+
var ButtonAsSemanticHtmlButton = function ButtonAsSemanticHtmlButton() {
|
|
136
140
|
return /*#__PURE__*/_react.default.createElement(_index.default, {
|
|
137
141
|
as: "button",
|
|
138
142
|
htmlType: "button",
|
|
@@ -146,7 +150,7 @@ ButtonAsSemanticHtmlButton.story = {
|
|
|
146
150
|
name: 'Button as semantic html button'
|
|
147
151
|
};
|
|
148
152
|
|
|
149
|
-
|
|
153
|
+
var ButtonAsSemanticHtmlSubmitButton = function ButtonAsSemanticHtmlSubmitButton() {
|
|
150
154
|
return /*#__PURE__*/_react.default.createElement(_index.default, {
|
|
151
155
|
as: "button",
|
|
152
156
|
htmlType: "submit",
|
|
@@ -159,7 +163,7 @@ ButtonAsSemanticHtmlSubmitButton.story = {
|
|
|
159
163
|
name: 'Button as semantic html submit button'
|
|
160
164
|
};
|
|
161
165
|
|
|
162
|
-
|
|
166
|
+
var ButtonAsInternalLink = function ButtonAsInternalLink() {
|
|
163
167
|
return /*#__PURE__*/_react.default.createElement(_index.default, {
|
|
164
168
|
as: "Link",
|
|
165
169
|
ctaText: "I am a button",
|
|
@@ -172,7 +176,7 @@ ButtonAsInternalLink.story = {
|
|
|
172
176
|
name: 'Button as internal link'
|
|
173
177
|
};
|
|
174
178
|
|
|
175
|
-
|
|
179
|
+
var WithOnClickMethod = function WithOnClickMethod() {
|
|
176
180
|
return /*#__PURE__*/_react.default.createElement(_index.default, {
|
|
177
181
|
ctaText: "I am a button",
|
|
178
182
|
onClick: (0, _addonActions.action)('button-click')
|
|
@@ -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,20 +13,18 @@ require("./Styles.css");
|
|
|
11
13
|
|
|
12
14
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
13
15
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
let classes = className + ' btn py-2 px-8 text-white border-2 bg-black hover:bg-white hover:text-black';
|
|
24
|
-
let iconLeft = /*#__PURE__*/React.createElement(_index.default, {
|
|
16
|
+
var ButtonSlide = function ButtonSlide(_ref) {
|
|
17
|
+
var ctaText = _ref.ctaText,
|
|
18
|
+
ctaLink = _ref.ctaLink,
|
|
19
|
+
className = _ref.className,
|
|
20
|
+
onClick = _ref.onClick,
|
|
21
|
+
leftIcon = _ref.leftIcon,
|
|
22
|
+
rightIcon = _ref.rightIcon;
|
|
23
|
+
var classes = className + ' btn py-2 px-8 text-white border-2 bg-black hover:bg-white hover:text-black';
|
|
24
|
+
var iconLeft = /*#__PURE__*/React.createElement(_index.default, {
|
|
25
25
|
type: leftIcon
|
|
26
26
|
});
|
|
27
|
-
|
|
27
|
+
var iconRight = /*#__PURE__*/React.createElement(_index.default, {
|
|
28
28
|
type: rightIcon
|
|
29
29
|
});
|
|
30
30
|
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
|
});
|
|
@@ -18,9 +20,11 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
18
20
|
var _default = {
|
|
19
21
|
title: 'Components/Card',
|
|
20
22
|
argTypes: {},
|
|
21
|
-
decorators: [
|
|
22
|
-
|
|
23
|
-
|
|
23
|
+
decorators: [function (story) {
|
|
24
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
25
|
+
className: "p-4"
|
|
26
|
+
}, story());
|
|
27
|
+
}],
|
|
24
28
|
parameters: {
|
|
25
29
|
readme: {
|
|
26
30
|
sidebar: _README.default
|
|
@@ -29,7 +33,7 @@ var _default = {
|
|
|
29
33
|
};
|
|
30
34
|
exports.default = _default;
|
|
31
35
|
|
|
32
|
-
|
|
36
|
+
var _Card = function _Card() {
|
|
33
37
|
return /*#__PURE__*/_react.default.createElement(_index.default, {
|
|
34
38
|
id: "card",
|
|
35
39
|
title: "This is a title",
|
|
@@ -41,7 +45,7 @@ const _Card = () => {
|
|
|
41
45
|
|
|
42
46
|
exports._Card = _Card;
|
|
43
47
|
|
|
44
|
-
|
|
48
|
+
var CardTitleLeft = function CardTitleLeft() {
|
|
45
49
|
return /*#__PURE__*/_react.default.createElement(_index.default, {
|
|
46
50
|
id: "card",
|
|
47
51
|
title: "This is a title",
|
|
@@ -53,7 +57,7 @@ const CardTitleLeft = () => {
|
|
|
53
57
|
|
|
54
58
|
exports.CardTitleLeft = CardTitleLeft;
|
|
55
59
|
|
|
56
|
-
|
|
60
|
+
var CardTitleRight = function CardTitleRight() {
|
|
57
61
|
return /*#__PURE__*/_react.default.createElement(_index.default, {
|
|
58
62
|
id: "card",
|
|
59
63
|
title: "This is a title",
|
|
@@ -65,7 +69,7 @@ const CardTitleRight = () => {
|
|
|
65
69
|
|
|
66
70
|
exports.CardTitleRight = CardTitleRight;
|
|
67
71
|
|
|
68
|
-
|
|
72
|
+
var CardWithImage = function CardWithImage() {
|
|
69
73
|
return /*#__PURE__*/_react.default.createElement(_index.default, {
|
|
70
74
|
id: "card",
|
|
71
75
|
title: "This is a title",
|
|
@@ -78,7 +82,7 @@ const CardWithImage = () => {
|
|
|
78
82
|
|
|
79
83
|
exports.CardWithImage = CardWithImage;
|
|
80
84
|
|
|
81
|
-
|
|
85
|
+
var CardWithExtraText = function CardWithExtraText() {
|
|
82
86
|
return /*#__PURE__*/_react.default.createElement(_index.default, {
|
|
83
87
|
id: "card",
|
|
84
88
|
title: "This is a title",
|
|
@@ -92,7 +96,7 @@ const CardWithExtraText = () => {
|
|
|
92
96
|
|
|
93
97
|
exports.CardWithExtraText = CardWithExtraText;
|
|
94
98
|
|
|
95
|
-
|
|
99
|
+
var CardWithButton = function CardWithButton() {
|
|
96
100
|
return /*#__PURE__*/_react.default.createElement(_index.default, {
|
|
97
101
|
id: "card",
|
|
98
102
|
title: "This is a title",
|
|
@@ -108,7 +112,7 @@ const CardWithButton = () => {
|
|
|
108
112
|
|
|
109
113
|
exports.CardWithButton = CardWithButton;
|
|
110
114
|
|
|
111
|
-
|
|
115
|
+
var CardWithSlideButton = function CardWithSlideButton() {
|
|
112
116
|
return /*#__PURE__*/_react.default.createElement(_index.default, {
|
|
113
117
|
id: "card",
|
|
114
118
|
title: "This is a title",
|
|
@@ -125,7 +129,7 @@ const CardWithSlideButton = () => {
|
|
|
125
129
|
|
|
126
130
|
exports.CardWithSlideButton = CardWithSlideButton;
|
|
127
131
|
|
|
128
|
-
|
|
132
|
+
var CardWithImageBelowTitle = function CardWithImageBelowTitle() {
|
|
129
133
|
return /*#__PURE__*/_react.default.createElement(_index.default, {
|
|
130
134
|
id: "card",
|
|
131
135
|
title: "This is a title",
|
|
@@ -142,7 +146,7 @@ const CardWithImageBelowTitle = () => {
|
|
|
142
146
|
|
|
143
147
|
exports.CardWithImageBelowTitle = CardWithImageBelowTitle;
|
|
144
148
|
|
|
145
|
-
|
|
149
|
+
var CardRounded = function CardRounded() {
|
|
146
150
|
return /*#__PURE__*/_react.default.createElement(_index.default, {
|
|
147
151
|
id: "card",
|
|
148
152
|
title: "This is a title",
|
|
@@ -159,7 +163,7 @@ const CardRounded = () => {
|
|
|
159
163
|
|
|
160
164
|
exports.CardRounded = CardRounded;
|
|
161
165
|
|
|
162
|
-
|
|
166
|
+
var CardRoundedWithImageBelowTitle = function CardRoundedWithImageBelowTitle() {
|
|
163
167
|
return /*#__PURE__*/_react.default.createElement(_index.default, {
|
|
164
168
|
id: "card",
|
|
165
169
|
title: "This is a title",
|
|
@@ -177,10 +181,10 @@ const CardRoundedWithImageBelowTitle = () => {
|
|
|
177
181
|
|
|
178
182
|
exports.CardRoundedWithImageBelowTitle = CardRoundedWithImageBelowTitle;
|
|
179
183
|
|
|
180
|
-
|
|
181
|
-
|
|
184
|
+
var lotsOfCards = function lotsOfCards() {
|
|
185
|
+
var cards = [];
|
|
182
186
|
|
|
183
|
-
for (
|
|
187
|
+
for (var i = 0; i < 8; i++) {
|
|
184
188
|
cards.push( /*#__PURE__*/_react.default.createElement(_index.default, {
|
|
185
189
|
id: "card",
|
|
186
190
|
title: "This is a title",
|
|
@@ -1,10 +1,14 @@
|
|
|
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
|
|
|
10
|
+
require("core-js/modules/es.symbol.js");
|
|
11
|
+
|
|
8
12
|
require("core-js/modules/es.symbol.description.js");
|
|
9
13
|
|
|
10
14
|
var _index = _interopRequireDefault(require("../Button/index"));
|
|
@@ -13,32 +17,30 @@ var _index2 = _interopRequireDefault(require("../ButtonSlide/index"));
|
|
|
13
17
|
|
|
14
18
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
19
|
|
|
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
|
-
let btnClass = 'w-full p-3';
|
|
41
|
-
let classList = 'flex flex-col border border-grey border-opacity-100 bg-white w-auto max-w-md ';
|
|
20
|
+
var Card = function Card(_ref) {
|
|
21
|
+
var id = _ref.id,
|
|
22
|
+
title = _ref.title,
|
|
23
|
+
image = _ref.image,
|
|
24
|
+
subTitle = _ref.subTitle,
|
|
25
|
+
description = _ref.description,
|
|
26
|
+
extraText = _ref.extraText,
|
|
27
|
+
hasCta = _ref.hasCta,
|
|
28
|
+
ctaText = _ref.ctaText,
|
|
29
|
+
imageBelowTitle = _ref.imageBelowTitle,
|
|
30
|
+
titleClass = _ref.titleClass,
|
|
31
|
+
imageClass = _ref.imageClass,
|
|
32
|
+
subTitleClass = _ref.subTitleClass,
|
|
33
|
+
extraTextClass = _ref.extraTextClass,
|
|
34
|
+
descriptionClass = _ref.descriptionClass,
|
|
35
|
+
classNames = _ref.classNames,
|
|
36
|
+
altText = _ref.altText,
|
|
37
|
+
btnType = _ref.btnType,
|
|
38
|
+
rounded = _ref.rounded;
|
|
39
|
+
var imageWrapperClass;
|
|
40
|
+
var titleWrapperClass = 'p-3';
|
|
41
|
+
var contentWrapperClass = 'px-3';
|
|
42
|
+
var btnClass = 'w-full p-3';
|
|
43
|
+
var classList = 'flex flex-col border border-grey border-opacity-100 bg-white w-auto max-w-md ';
|
|
42
44
|
classList += classNames ? classNames : '';
|
|
43
45
|
imageWrapperClass = imageBelowTitle ? imageWrapperClass + ' order-2' : imageWrapperClass;
|
|
44
46
|
titleWrapperClass = imageBelowTitle ? titleWrapperClass + ' order-1' : titleWrapperClass;
|