trepur_components 0.1.0
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/.storybook/main.js +32 -0
- package/.storybook/preview.js +9 -0
- package/README.md +70 -0
- package/babel.config.json +18 -0
- package/craco.config.js +10 -0
- package/dist/App.css +42 -0
- package/dist/App.js +24 -0
- package/dist/Components/Breadcrumbs/Breadcrumbs.js +32 -0
- package/dist/Components/Breadcrumbs/Breadcrumbs.stories.js +164 -0
- package/dist/Components/Breadcrumbs/README.md +1 -0
- package/dist/Components/BreadcrumbsBordered/Breadcrumbs.js +49 -0
- package/dist/Components/BreadcrumbsBordered/Breadcrumbs.stories.js +164 -0
- package/dist/Components/BreadcrumbsBordered/README.md +1 -0
- package/dist/Components/Button/Button.js +35 -0
- package/dist/Components/Button/Button.stories.js +185 -0
- package/dist/Components/Button/README.md +1 -0
- package/dist/Components/ButtonSlide/ButtonSlide.js +37 -0
- package/dist/Components/ButtonSlide/ButtonSlide.stories.js +185 -0
- package/dist/Components/ButtonSlide/README.md +1 -0
- package/dist/Components/ButtonSlide/Styles.css +25 -0
- package/dist/Components/Card/Card.js +83 -0
- package/dist/Components/Card/Card.stories.js +204 -0
- package/dist/Components/Card/README.md +1 -0
- package/dist/Components/CardImageLink/CardImageLink.js +36 -0
- package/dist/Components/CardImageLink/CardImageLink.stories.js +89 -0
- package/dist/Components/CardImageLink/README.md +0 -0
- package/dist/Components/CardImageLinkList/CardImageLinkList.js +35 -0
- package/dist/Components/CardImageLinkList/CardImageLinkList.stories.js +63 -0
- package/dist/Components/CardImageLinkList/README.md +0 -0
- package/dist/Components/CardList/CardList.js +36 -0
- package/dist/Components/CardList/CardList.stories.js +204 -0
- package/dist/Components/CardList/README.md +1 -0
- package/dist/Components/Icon/Icon.js +45 -0
- package/dist/Components/Icon/Icon.stories.js +73 -0
- package/dist/Components/Icon/README.md +1 -0
- package/dist/Components/Jumbotron/Jumbotron.js +43 -0
- package/dist/Components/Jumbotron/Jumbotron.stories.js +81 -0
- package/dist/Components/Jumbotron/README.md +0 -0
- package/dist/Components/Nav.js +170 -0
- package/dist/Components/Profile.js +41 -0
- package/dist/Components/Search.js +43 -0
- package/dist/Components/SignedInLinks.js +27 -0
- package/dist/Components/SignedOutLinks.js +22 -0
- package/dist/index.css +67 -0
- package/dist/index.js +19 -0
- package/package.json +71 -0
- package/public/Breadcrumbs/Breadcrumbs.stories.js +144 -0
- package/public/Logo.png +0 -0
- package/public/index.html +10 -0
- package/public/manifest.json +25 -0
- package/public/robots.txt +3 -0
- package/public/user.jpeg +0 -0
- package/src/App.css +42 -0
- package/src/App.js +23 -0
- package/src/Components/Breadcrumbs/Breadcrumbs.js +27 -0
- package/src/Components/Breadcrumbs/Breadcrumbs.stories.js +158 -0
- package/src/Components/Breadcrumbs/README.md +1 -0
- package/src/Components/BreadcrumbsBordered/Breadcrumbs.js +35 -0
- package/src/Components/BreadcrumbsBordered/Breadcrumbs.stories.js +159 -0
- package/src/Components/BreadcrumbsBordered/README.md +1 -0
- package/src/Components/Button/Button.js +26 -0
- package/src/Components/Button/Button.stories.js +144 -0
- package/src/Components/Button/README.md +1 -0
- package/src/Components/ButtonSlide/ButtonSlide.js +26 -0
- package/src/Components/ButtonSlide/ButtonSlide.stories.js +144 -0
- package/src/Components/ButtonSlide/README.md +1 -0
- package/src/Components/ButtonSlide/Styles.css +25 -0
- package/src/Components/Card/Card.js +67 -0
- package/src/Components/Card/Card.stories.js +190 -0
- package/src/Components/Card/README.md +1 -0
- package/src/Components/CardImageLink/CardImageLink.js +22 -0
- package/src/Components/CardImageLink/CardImageLink.stories.js +73 -0
- package/src/Components/CardImageLink/README.md +0 -0
- package/src/Components/CardImageLinkList/CardImageLinkList.js +24 -0
- package/src/Components/CardImageLinkList/CardImageLinkList.stories.js +50 -0
- package/src/Components/CardImageLinkList/README.md +0 -0
- package/src/Components/CardList/CardList.js +29 -0
- package/src/Components/CardList/CardList.stories.js +201 -0
- package/src/Components/CardList/README.md +1 -0
- package/src/Components/Icon/Icon.js +28 -0
- package/src/Components/Icon/Icon.stories.js +49 -0
- package/src/Components/Icon/README.md +1 -0
- package/src/Components/Jumbotron/Jumbotron.js +31 -0
- package/src/Components/Jumbotron/Jumbotron.stories.js +66 -0
- package/src/Components/Jumbotron/README.md +0 -0
- package/src/Components/Nav.js +109 -0
- package/src/Components/Profile.js +25 -0
- package/src/Components/Search.js +26 -0
- package/src/Components/SignedInLinks.js +14 -0
- package/src/Components/SignedOutLinks.js +11 -0
- package/src/index.css +67 -0
- package/src/index.js +4 -0
- package/tailwind.config.js +69 -0
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = exports._Button = exports.WithOnClickMethod = exports.WithIconRight = exports.WithIconLeft = exports.WithBothIcons = exports.SecondaryButton = exports.ButtonAsSemanticHtmlSubmitButton = exports.ButtonAsSemanticHtmlButton = exports.ButtonAsInternalLink = exports.ButtonAsExternalLink = void 0;
|
|
7
|
+
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
|
|
10
|
+
var _addonActions = require("@storybook/addon-actions");
|
|
11
|
+
|
|
12
|
+
var _README = _interopRequireDefault(require("./README.md"));
|
|
13
|
+
|
|
14
|
+
var _Button2 = _interopRequireDefault(require("./Button"));
|
|
15
|
+
|
|
16
|
+
require("../../index.css");
|
|
17
|
+
|
|
18
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
19
|
+
|
|
20
|
+
var _default = {
|
|
21
|
+
title: 'Components/Button',
|
|
22
|
+
argTypes: {
|
|
23
|
+
label: {
|
|
24
|
+
name: 'Text',
|
|
25
|
+
control: {
|
|
26
|
+
type: 'text'
|
|
27
|
+
},
|
|
28
|
+
defaultValue: 'Shop Now'
|
|
29
|
+
},
|
|
30
|
+
type: {
|
|
31
|
+
name: 'Type',
|
|
32
|
+
defaultValue: 'primary',
|
|
33
|
+
options: ['primary', 'secondary', 'ghost'],
|
|
34
|
+
control: {
|
|
35
|
+
type: 'select'
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
iconPlacement: {
|
|
39
|
+
name: 'Icon',
|
|
40
|
+
defaultValue: 'none',
|
|
41
|
+
options: ['left', 'right', 'both', 'none'],
|
|
42
|
+
control: {
|
|
43
|
+
type: 'select'
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
padded: {
|
|
47
|
+
name: 'Padded',
|
|
48
|
+
control: {
|
|
49
|
+
type: 'boolean'
|
|
50
|
+
},
|
|
51
|
+
defaultValue: false
|
|
52
|
+
},
|
|
53
|
+
social: {
|
|
54
|
+
name: 'Social',
|
|
55
|
+
defaultValue: 'None',
|
|
56
|
+
options: ['Facebook', 'Twitter', 'Whatsapp', 'None'],
|
|
57
|
+
control: {
|
|
58
|
+
type: 'select'
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
},
|
|
62
|
+
decorators: [story => /*#__PURE__*/_react.default.createElement("div", {
|
|
63
|
+
className: "p-4"
|
|
64
|
+
}, story())],
|
|
65
|
+
parameters: {
|
|
66
|
+
readme: {
|
|
67
|
+
sidebar: _README.default
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
};
|
|
71
|
+
exports.default = _default;
|
|
72
|
+
|
|
73
|
+
const _Button = args => {
|
|
74
|
+
return /*#__PURE__*/_react.default.createElement(_Button2.default, {
|
|
75
|
+
ctaText: "I am a button"
|
|
76
|
+
});
|
|
77
|
+
};
|
|
78
|
+
|
|
79
|
+
exports._Button = _Button;
|
|
80
|
+
|
|
81
|
+
const SecondaryButton = () => {
|
|
82
|
+
return /*#__PURE__*/_react.default.createElement(_Button2.default, {
|
|
83
|
+
ctaText: "I am a button"
|
|
84
|
+
});
|
|
85
|
+
};
|
|
86
|
+
|
|
87
|
+
exports.SecondaryButton = SecondaryButton;
|
|
88
|
+
|
|
89
|
+
const WithIconRight = () => {
|
|
90
|
+
return /*#__PURE__*/_react.default.createElement(_Button2.default, {
|
|
91
|
+
rightIcon: "thumbs-up",
|
|
92
|
+
ctaText: "I am a button"
|
|
93
|
+
});
|
|
94
|
+
};
|
|
95
|
+
|
|
96
|
+
exports.WithIconRight = WithIconRight;
|
|
97
|
+
WithIconRight.story = {
|
|
98
|
+
name: 'With Icon (right)'
|
|
99
|
+
};
|
|
100
|
+
|
|
101
|
+
const WithIconLeft = () => {
|
|
102
|
+
return /*#__PURE__*/_react.default.createElement(_Button2.default, {
|
|
103
|
+
leftIcon: "sign-in",
|
|
104
|
+
ctaText: "I am a button"
|
|
105
|
+
});
|
|
106
|
+
};
|
|
107
|
+
|
|
108
|
+
exports.WithIconLeft = WithIconLeft;
|
|
109
|
+
WithIconLeft.story = {
|
|
110
|
+
name: 'With Icon (left)'
|
|
111
|
+
};
|
|
112
|
+
|
|
113
|
+
const WithBothIcons = () => {
|
|
114
|
+
return /*#__PURE__*/_react.default.createElement(_Button2.default, {
|
|
115
|
+
leftIcon: "star",
|
|
116
|
+
rightIcon: "star",
|
|
117
|
+
ctaText: "I am a button"
|
|
118
|
+
});
|
|
119
|
+
};
|
|
120
|
+
|
|
121
|
+
exports.WithBothIcons = WithBothIcons;
|
|
122
|
+
|
|
123
|
+
const ButtonAsExternalLink = () => {
|
|
124
|
+
return /*#__PURE__*/_react.default.createElement(_Button2.default, {
|
|
125
|
+
as: "a-external",
|
|
126
|
+
ctaText: "I am a button"
|
|
127
|
+
});
|
|
128
|
+
};
|
|
129
|
+
|
|
130
|
+
exports.ButtonAsExternalLink = ButtonAsExternalLink;
|
|
131
|
+
ButtonAsExternalLink.story = {
|
|
132
|
+
name: 'Button as external link'
|
|
133
|
+
};
|
|
134
|
+
|
|
135
|
+
const ButtonAsSemanticHtmlButton = () => {
|
|
136
|
+
return /*#__PURE__*/_react.default.createElement(_Button2.default, {
|
|
137
|
+
as: "button",
|
|
138
|
+
htmlType: "button",
|
|
139
|
+
ctaText: "I am a button",
|
|
140
|
+
url: "/"
|
|
141
|
+
});
|
|
142
|
+
};
|
|
143
|
+
|
|
144
|
+
exports.ButtonAsSemanticHtmlButton = ButtonAsSemanticHtmlButton;
|
|
145
|
+
ButtonAsSemanticHtmlButton.story = {
|
|
146
|
+
name: 'Button as semantic html button'
|
|
147
|
+
};
|
|
148
|
+
|
|
149
|
+
const ButtonAsSemanticHtmlSubmitButton = () => {
|
|
150
|
+
return /*#__PURE__*/_react.default.createElement(_Button2.default, {
|
|
151
|
+
as: "button",
|
|
152
|
+
htmlType: "submit",
|
|
153
|
+
ctaText: "I am a button"
|
|
154
|
+
});
|
|
155
|
+
};
|
|
156
|
+
|
|
157
|
+
exports.ButtonAsSemanticHtmlSubmitButton = ButtonAsSemanticHtmlSubmitButton;
|
|
158
|
+
ButtonAsSemanticHtmlSubmitButton.story = {
|
|
159
|
+
name: 'Button as semantic html submit button'
|
|
160
|
+
};
|
|
161
|
+
|
|
162
|
+
const ButtonAsInternalLink = () => {
|
|
163
|
+
return /*#__PURE__*/_react.default.createElement(_Button2.default, {
|
|
164
|
+
as: "Link",
|
|
165
|
+
ctaText: "I am a button",
|
|
166
|
+
url: "/"
|
|
167
|
+
});
|
|
168
|
+
};
|
|
169
|
+
|
|
170
|
+
exports.ButtonAsInternalLink = ButtonAsInternalLink;
|
|
171
|
+
ButtonAsInternalLink.story = {
|
|
172
|
+
name: 'Button as internal link'
|
|
173
|
+
};
|
|
174
|
+
|
|
175
|
+
const WithOnClickMethod = () => {
|
|
176
|
+
return /*#__PURE__*/_react.default.createElement(_Button2.default, {
|
|
177
|
+
ctaText: "I am a button",
|
|
178
|
+
onClick: (0, _addonActions.action)('button-click')
|
|
179
|
+
});
|
|
180
|
+
};
|
|
181
|
+
|
|
182
|
+
exports.WithOnClickMethod = WithOnClickMethod;
|
|
183
|
+
WithOnClickMethod.story = {
|
|
184
|
+
name: 'With onClick method'
|
|
185
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
hello this is an icon
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
|
|
8
|
+
var _Icon = _interopRequireDefault(require("../Icon/Icon"));
|
|
9
|
+
|
|
10
|
+
require("./Styles.css");
|
|
11
|
+
|
|
12
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
13
|
+
|
|
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(_Icon.default, {
|
|
25
|
+
type: leftIcon
|
|
26
|
+
});
|
|
27
|
+
let iconRight = /*#__PURE__*/React.createElement(_Icon.default, {
|
|
28
|
+
type: rightIcon
|
|
29
|
+
});
|
|
30
|
+
return /*#__PURE__*/React.createElement("button", {
|
|
31
|
+
className: classes,
|
|
32
|
+
onClick: onClick
|
|
33
|
+
}, leftIcon && iconLeft, ctaText, rightIcon && iconRight);
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
var _default = ButtonSlide;
|
|
37
|
+
exports.default = _default;
|
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = exports._Button = exports.WithOnClickMethod = exports.WithIconRight = exports.WithIconLeft = exports.WithBothIcons = exports.SecondaryButton = exports.ButtonAsSemanticHtmlSubmitButton = exports.ButtonAsSemanticHtmlButton = exports.ButtonAsInternalLink = exports.ButtonAsExternalLink = void 0;
|
|
7
|
+
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
|
|
10
|
+
var _addonActions = require("@storybook/addon-actions");
|
|
11
|
+
|
|
12
|
+
var _README = _interopRequireDefault(require("./README.md"));
|
|
13
|
+
|
|
14
|
+
var _ButtonSlide = _interopRequireDefault(require("./ButtonSlide"));
|
|
15
|
+
|
|
16
|
+
require("../../index.css");
|
|
17
|
+
|
|
18
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
19
|
+
|
|
20
|
+
var _default = {
|
|
21
|
+
title: 'Components/ButtonSlide',
|
|
22
|
+
argTypes: {
|
|
23
|
+
label: {
|
|
24
|
+
name: 'Text',
|
|
25
|
+
control: {
|
|
26
|
+
type: 'text'
|
|
27
|
+
},
|
|
28
|
+
defaultValue: 'Shop Now'
|
|
29
|
+
},
|
|
30
|
+
type: {
|
|
31
|
+
name: 'Type',
|
|
32
|
+
defaultValue: 'primary',
|
|
33
|
+
options: ['primary', 'secondary', 'ghost'],
|
|
34
|
+
control: {
|
|
35
|
+
type: 'select'
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
iconPlacement: {
|
|
39
|
+
name: 'Icon',
|
|
40
|
+
defaultValue: 'none',
|
|
41
|
+
options: ['left', 'right', 'both', 'none'],
|
|
42
|
+
control: {
|
|
43
|
+
type: 'select'
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
padded: {
|
|
47
|
+
name: 'Padded',
|
|
48
|
+
control: {
|
|
49
|
+
type: 'boolean'
|
|
50
|
+
},
|
|
51
|
+
defaultValue: false
|
|
52
|
+
},
|
|
53
|
+
social: {
|
|
54
|
+
name: 'Social',
|
|
55
|
+
defaultValue: 'None',
|
|
56
|
+
options: ['Facebook', 'Twitter', 'Whatsapp', 'None'],
|
|
57
|
+
control: {
|
|
58
|
+
type: 'select'
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
},
|
|
62
|
+
decorators: [story => /*#__PURE__*/_react.default.createElement("div", {
|
|
63
|
+
className: "p-4"
|
|
64
|
+
}, story())],
|
|
65
|
+
parameters: {
|
|
66
|
+
readme: {
|
|
67
|
+
sidebar: _README.default
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
};
|
|
71
|
+
exports.default = _default;
|
|
72
|
+
|
|
73
|
+
const _Button = args => {
|
|
74
|
+
return /*#__PURE__*/_react.default.createElement(_ButtonSlide.default, {
|
|
75
|
+
ctaText: "READ MORE"
|
|
76
|
+
});
|
|
77
|
+
};
|
|
78
|
+
|
|
79
|
+
exports._Button = _Button;
|
|
80
|
+
|
|
81
|
+
const SecondaryButton = () => {
|
|
82
|
+
return /*#__PURE__*/_react.default.createElement(_ButtonSlide.default, {
|
|
83
|
+
ctaText: "I am a button"
|
|
84
|
+
});
|
|
85
|
+
};
|
|
86
|
+
|
|
87
|
+
exports.SecondaryButton = SecondaryButton;
|
|
88
|
+
|
|
89
|
+
const WithIconRight = () => {
|
|
90
|
+
return /*#__PURE__*/_react.default.createElement(_ButtonSlide.default, {
|
|
91
|
+
rightIcon: "thumbs-up",
|
|
92
|
+
ctaText: "I am a button"
|
|
93
|
+
});
|
|
94
|
+
};
|
|
95
|
+
|
|
96
|
+
exports.WithIconRight = WithIconRight;
|
|
97
|
+
WithIconRight.story = {
|
|
98
|
+
name: 'With Icon (right)'
|
|
99
|
+
};
|
|
100
|
+
|
|
101
|
+
const WithIconLeft = () => {
|
|
102
|
+
return /*#__PURE__*/_react.default.createElement(_ButtonSlide.default, {
|
|
103
|
+
leftIcon: "sign-in",
|
|
104
|
+
ctaText: "I am a button"
|
|
105
|
+
});
|
|
106
|
+
};
|
|
107
|
+
|
|
108
|
+
exports.WithIconLeft = WithIconLeft;
|
|
109
|
+
WithIconLeft.story = {
|
|
110
|
+
name: 'With Icon (left)'
|
|
111
|
+
};
|
|
112
|
+
|
|
113
|
+
const WithBothIcons = () => {
|
|
114
|
+
return /*#__PURE__*/_react.default.createElement(_ButtonSlide.default, {
|
|
115
|
+
leftIcon: "star",
|
|
116
|
+
rightIcon: "star",
|
|
117
|
+
ctaText: "I am a button"
|
|
118
|
+
});
|
|
119
|
+
};
|
|
120
|
+
|
|
121
|
+
exports.WithBothIcons = WithBothIcons;
|
|
122
|
+
|
|
123
|
+
const ButtonAsExternalLink = () => {
|
|
124
|
+
return /*#__PURE__*/_react.default.createElement(_ButtonSlide.default, {
|
|
125
|
+
as: "a-external",
|
|
126
|
+
ctaText: "I am a button"
|
|
127
|
+
});
|
|
128
|
+
};
|
|
129
|
+
|
|
130
|
+
exports.ButtonAsExternalLink = ButtonAsExternalLink;
|
|
131
|
+
ButtonAsExternalLink.story = {
|
|
132
|
+
name: 'Button as external link'
|
|
133
|
+
};
|
|
134
|
+
|
|
135
|
+
const ButtonAsSemanticHtmlButton = () => {
|
|
136
|
+
return /*#__PURE__*/_react.default.createElement(_ButtonSlide.default, {
|
|
137
|
+
as: "button",
|
|
138
|
+
htmlType: "button",
|
|
139
|
+
ctaText: "I am a button",
|
|
140
|
+
url: "/"
|
|
141
|
+
});
|
|
142
|
+
};
|
|
143
|
+
|
|
144
|
+
exports.ButtonAsSemanticHtmlButton = ButtonAsSemanticHtmlButton;
|
|
145
|
+
ButtonAsSemanticHtmlButton.story = {
|
|
146
|
+
name: 'Button as semantic html button'
|
|
147
|
+
};
|
|
148
|
+
|
|
149
|
+
const ButtonAsSemanticHtmlSubmitButton = () => {
|
|
150
|
+
return /*#__PURE__*/_react.default.createElement(_ButtonSlide.default, {
|
|
151
|
+
as: "button",
|
|
152
|
+
htmlType: "submit",
|
|
153
|
+
ctaText: "I am a button"
|
|
154
|
+
});
|
|
155
|
+
};
|
|
156
|
+
|
|
157
|
+
exports.ButtonAsSemanticHtmlSubmitButton = ButtonAsSemanticHtmlSubmitButton;
|
|
158
|
+
ButtonAsSemanticHtmlSubmitButton.story = {
|
|
159
|
+
name: 'Button as semantic html submit button'
|
|
160
|
+
};
|
|
161
|
+
|
|
162
|
+
const ButtonAsInternalLink = () => {
|
|
163
|
+
return /*#__PURE__*/_react.default.createElement(_ButtonSlide.default, {
|
|
164
|
+
as: "Link",
|
|
165
|
+
ctaText: "I am a button",
|
|
166
|
+
url: "/"
|
|
167
|
+
});
|
|
168
|
+
};
|
|
169
|
+
|
|
170
|
+
exports.ButtonAsInternalLink = ButtonAsInternalLink;
|
|
171
|
+
ButtonAsInternalLink.story = {
|
|
172
|
+
name: 'Button as internal link'
|
|
173
|
+
};
|
|
174
|
+
|
|
175
|
+
const WithOnClickMethod = () => {
|
|
176
|
+
return /*#__PURE__*/_react.default.createElement(_ButtonSlide.default, {
|
|
177
|
+
ctaText: "I am a button",
|
|
178
|
+
onClick: (0, _addonActions.action)('button-click')
|
|
179
|
+
});
|
|
180
|
+
};
|
|
181
|
+
|
|
182
|
+
exports.WithOnClickMethod = WithOnClickMethod;
|
|
183
|
+
WithOnClickMethod.story = {
|
|
184
|
+
name: 'With onClick method'
|
|
185
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
hello this is an icon
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
.btn {
|
|
2
|
+
border: 1px solid black;
|
|
3
|
+
-webkit-transform: translate3d(0, 0, 0);
|
|
4
|
+
transform: translate3d(0, 0, 0);
|
|
5
|
+
-webkit-transition: all 1s cubic-bezier(0.455, 0.03, 0.515, 0.955);
|
|
6
|
+
transition: all 1s cubic-bezier(0.455, 0.03, 0.515, 0.955);
|
|
7
|
+
cursor: pointer;
|
|
8
|
+
}
|
|
9
|
+
.btn:after {
|
|
10
|
+
position: absolute;
|
|
11
|
+
top: 0;
|
|
12
|
+
left: 0;
|
|
13
|
+
height: 100%;
|
|
14
|
+
width: 0;
|
|
15
|
+
background: #FFF;
|
|
16
|
+
border: 1px white;
|
|
17
|
+
content: '';
|
|
18
|
+
z-index: -1;
|
|
19
|
+
-webkit-transition: all 1s cubic-bezier(0.785, 0.135, 0.15, 0.86);
|
|
20
|
+
transition: all 1s cubic-bezier(0.785, 0.135, 0.15, 0.86);
|
|
21
|
+
will-change: width;
|
|
22
|
+
}
|
|
23
|
+
.btn:hover:after {
|
|
24
|
+
width: 100%;
|
|
25
|
+
}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
|
|
8
|
+
require("core-js/modules/es.symbol.description.js");
|
|
9
|
+
|
|
10
|
+
var _Button = _interopRequireDefault(require("../Button/Button"));
|
|
11
|
+
|
|
12
|
+
var _ButtonSlide = _interopRequireDefault(require("../ButtonSlide/ButtonSlide"));
|
|
13
|
+
|
|
14
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
|
+
|
|
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 ';
|
|
42
|
+
classList += classNames ? classNames : '';
|
|
43
|
+
imageWrapperClass = imageBelowTitle ? imageWrapperClass + ' order-2' : imageWrapperClass;
|
|
44
|
+
titleWrapperClass = imageBelowTitle ? titleWrapperClass + ' order-1' : titleWrapperClass;
|
|
45
|
+
contentWrapperClass = imageBelowTitle ? contentWrapperClass + ' order-3' : contentWrapperClass;
|
|
46
|
+
btnClass = imageBelowTitle ? btnClass + ' order-4' : btnClass;
|
|
47
|
+
imageWrapperClass = rounded ? imageWrapperClass + ' rounded-t-lg' : imageWrapperClass;
|
|
48
|
+
classList = rounded ? classList + ' rounded-lg' : classList;
|
|
49
|
+
imageClass += imageBelowTitle ? '' : rounded ? ' rounded-t-lg' : '';
|
|
50
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
51
|
+
id: id,
|
|
52
|
+
className: classList
|
|
53
|
+
}, image && /*#__PURE__*/React.createElement("div", {
|
|
54
|
+
className: imageWrapperClass && imageWrapperClass
|
|
55
|
+
}, /*#__PURE__*/React.createElement("img", {
|
|
56
|
+
className: imageClass,
|
|
57
|
+
src: image,
|
|
58
|
+
alt: altText
|
|
59
|
+
})), /*#__PURE__*/React.createElement("div", {
|
|
60
|
+
className: titleWrapperClass
|
|
61
|
+
}, /*#__PURE__*/React.createElement("h1", {
|
|
62
|
+
className: titleClass
|
|
63
|
+
}, title)), /*#__PURE__*/React.createElement("div", {
|
|
64
|
+
className: contentWrapperClass
|
|
65
|
+
}, /*#__PURE__*/React.createElement("h2", {
|
|
66
|
+
className: subTitleClass && subTitleClass
|
|
67
|
+
}, subTitle), /*#__PURE__*/React.createElement("h2", {
|
|
68
|
+
className: extraTextClass && extraTextClass
|
|
69
|
+
}, extraText), /*#__PURE__*/React.createElement("h6", {
|
|
70
|
+
className: descriptionClass && descriptionClass
|
|
71
|
+
}, description)), hasCta && /*#__PURE__*/React.createElement("div", {
|
|
72
|
+
className: btnClass
|
|
73
|
+
}, btnType !== 'slide' ? /*#__PURE__*/React.createElement(_Button.default, {
|
|
74
|
+
className: "w-full",
|
|
75
|
+
ctaText: ctaText
|
|
76
|
+
}) : /*#__PURE__*/React.createElement(_ButtonSlide.default, {
|
|
77
|
+
className: "w-full",
|
|
78
|
+
ctaText: ctaText
|
|
79
|
+
})));
|
|
80
|
+
};
|
|
81
|
+
|
|
82
|
+
var _default = Card;
|
|
83
|
+
exports.default = _default;
|