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