@sellout/ui 0.0.9 → 0.0.12

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/build/Colors.d.ts CHANGED
@@ -3,7 +3,9 @@ export declare enum Colors {
3
3
  Black = "#000000",
4
4
  Green = "#419D78",
5
5
  OffWhite = "#FCFCFC",
6
- Blue = "#020151",
6
+ LightBlue = "#39159C",
7
+ Blue = "#2D0E84",
8
+ DarkBlue = "#1D0858",
7
9
  Red = "#E63946",
8
10
  Orange = "#FF700F",
9
11
  DarkOrange = "#D65600",
@@ -6,11 +6,11 @@ export declare enum ButtonStates {
6
6
  Active = "Active"
7
7
  }
8
8
  export declare type ButtonProps = {
9
- type: string;
9
+ type?: string;
10
10
  state?: string;
11
- text: string;
11
+ text?: string;
12
12
  onClick?: any;
13
- icon?: string;
13
+ icon?: any;
14
14
  margin?: string;
15
15
  padding?: string;
16
16
  loading?: boolean;
@@ -104,5 +104,6 @@ export declare type IconProps = {
104
104
  left?: string | number | undefined;
105
105
  right?: string | number | undefined;
106
106
  zIndex?: number | void;
107
+ margin?: string | number | undefined;
107
108
  };
108
- export default function Icon({ icon, color, onClick, size, top, left, right, position, zIndex, }: IconProps): JSX.Element;
109
+ export default function Icon({ icon, color, onClick, size, top, left, right, position, zIndex, margin, }: IconProps): JSX.Element;
package/build/index.es.js CHANGED
@@ -16,7 +16,9 @@ var Colors;
16
16
  Colors["Black"] = "#000000";
17
17
  Colors["Green"] = "#419D78";
18
18
  Colors["OffWhite"] = "#FCFCFC";
19
- Colors["Blue"] = "#020151";
19
+ Colors["LightBlue"] = "#39159C";
20
+ Colors["Blue"] = "#2D0E84";
21
+ Colors["DarkBlue"] = "#1D0858";
20
22
  Colors["Red"] = "#E63946";
21
23
  Colors["Orange"] = "#FF700F";
22
24
  Colors["DarkOrange"] = "#D65600";
@@ -75,54 +77,6 @@ function Loader(_a) {
75
77
  }
76
78
  var templateObject_1;
77
79
 
78
- // import Icon from "./Icon";
79
- var ButtonTypes;
80
- (function (ButtonTypes) {
81
- ButtonTypes["Submit"] = "Submit";
82
- })(ButtonTypes || (ButtonTypes = {}));
83
- var ButtonStates;
84
- (function (ButtonStates) {
85
- ButtonStates["Active"] = "Active";
86
- })(ButtonStates || (ButtonStates = {}));
87
- var StyledButton = styled.div(templateObject_1$1 || (templateObject_1$1 = __makeTemplateObject(["\n position: relative;\n height: 40px;\n width: 100%;\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: center;\n text-align: center;\n border-radius: 10px;\n transition: all 0.2s;\n margin: ", ";\n padding: ", ";\n background-color: ", ";\n\n &:hover {\n cursor: ", ";\n background-color: ", ";\n }\n\n &:active {\n cursor: ", ";\n background-color: ", ";\n }\n"], ["\n position: relative;\n height: 40px;\n width: 100%;\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: center;\n text-align: center;\n border-radius: 10px;\n transition: all 0.2s;\n margin: ", ";\n padding: ", ";\n background-color: ",
88
- ";\n\n &:hover {\n cursor: ", ";\n background-color: ",
89
- ";\n }\n\n &:active {\n cursor: ", ";\n background-color: ",
90
- ";\n }\n"])), function (props) { return (Boolean(props.margin) ? props.margin : "0px"); }, function (props) { return (Boolean(props.padding) ? props.padding : "0px"); }, function (props) {
91
- if (props.type === ButtonTypes.Submit) {
92
- return Colors.Orange;
93
- }
94
- return null;
95
- }, function (props) { return (props.onClick ? "pointer" : null); }, function (props) {
96
- if (props.onClick && props.type === ButtonTypes.Submit) {
97
- return lighten(0.025, Colors.Orange);
98
- }
99
- return null;
100
- }, function (props) { return (props.onClick ? "pointer" : null); }, function (props) {
101
- if (props.onClick && props.type === ButtonTypes.Submit) {
102
- return darken(0.025, Colors.Orange);
103
- }
104
- return null;
105
- });
106
- var Text = styled.span(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n font-size: 1.4rem;\n font-weight: 600;\n text-transform: uppercase;\n margin-left: ", ";\n color: ", ";\n"], ["\n font-size: 1.4rem;\n font-weight: 600;\n text-transform: uppercase;\n margin-left: ", ";\n color: ",
107
- ";\n"])), function (props) { return (props.icon ? "10px" : 0); }, function (props) {
108
- if (props.type === ButtonTypes.Submit) {
109
- return Colors.White;
110
- }
111
- return null;
112
- });
113
- function Button(_a) {
114
- var _b = _a.type, type = _b === void 0 ? ButtonTypes.Submit : _b, _c = _a.state, state = _c === void 0 ? ButtonStates.Active : _c, text = _a.text, _d = _a.onClick, onClick = _d === void 0 ? function () { } : _d, icon = _a.icon, margin = _a.margin, padding = _a.padding, _e = _a.loading, loading = _e === void 0 ? false : _e;
115
- return (React.createElement(StyledButton, { type: type, onClick: loading ? null : function () { return onClick(); }, margin: margin, padding: padding, state: state }, (function () {
116
- return (React.createElement(Fragment, null, (function () {
117
- if (loading) {
118
- return React.createElement(Loader, { size: LoaderSizes.VerySmall });
119
- }
120
- return (React.createElement(Text, { type: type, icon: Boolean(icon) }, text));
121
- })()));
122
- })()));
123
- }
124
- var templateObject_1$1, templateObject_2;
125
-
126
80
  // import { library } from "@fortawesome/fontawesome-svg-core";
127
81
  var IconEnum = {
128
82
  AudienceRegular: faUserFriends,
@@ -221,7 +175,8 @@ var IconEnum = {
221
175
 
222
176
  var Icons = IconEnum;
223
177
  function Icon(_a) {
224
- var _b = _a.icon, icon = _b === void 0 ? Icons.AudienceRegular : _b, _c = _a.color, color = _c === void 0 ? Colors.Orange : _c, _d = _a.onClick, onClick = _d === void 0 ? function () { } : _d, _e = _a.size, size = _e === void 0 ? 20 : _e, top = _a.top, left = _a.left, right = _a.right, _f = _a.position, position = _f === void 0 ? 'relative' : _f, zIndex = _a.zIndex;
178
+ var _b = _a.icon, icon = _b === void 0 ? Icons.AudienceRegular : _b, _c = _a.color, color = _c === void 0 ? Colors.Orange : _c, onClick = _a.onClick, _d = _a.size, size = _d === void 0 ? 20 : _d, top = _a.top, left = _a.left, right = _a.right, _e = _a.position, position = _e === void 0 ? 'relative' : _e, zIndex = _a.zIndex, margin = _a.margin;
179
+ var cursor = onClick ? 'pointer' : '';
225
180
  return (React.createElement(FontAwesomeIcon, { icon: icon, onClick: onClick, style: {
226
181
  color: color,
227
182
  top: top,
@@ -230,10 +185,61 @@ function Icon(_a) {
230
185
  position: position,
231
186
  zIndex: zIndex,
232
187
  fontSize: size,
233
- transition: "all 0.2s"
188
+ transition: "all 0.2s",
189
+ margin: margin,
190
+ cursor: cursor,
234
191
  } }));
235
192
  }
236
193
 
194
+ var ButtonTypes;
195
+ (function (ButtonTypes) {
196
+ ButtonTypes["Submit"] = "Submit";
197
+ })(ButtonTypes || (ButtonTypes = {}));
198
+ var ButtonStates;
199
+ (function (ButtonStates) {
200
+ ButtonStates["Active"] = "Active";
201
+ })(ButtonStates || (ButtonStates = {}));
202
+ var StyledButton = styled.div(templateObject_1$1 || (templateObject_1$1 = __makeTemplateObject(["\n position: relative;\n height: 40px;\n width: 100%;\n display: flex;\n flex-direction: row;\n align-items: center;\n overflow: hidden;\n justify-content: center;\n white-space: nowrap;\n text-align: center;\n border-radius: 10px;\n transition: all 0.2s;\n margin: ", ";\n padding: ", ";\n background-color: ", ";\n\n &:hover {\n cursor: ", ";\n background-color: ", ";\n }\n\n &:active {\n cursor: ", ";\n background-color: ", ";\n }\n"], ["\n position: relative;\n height: 40px;\n width: 100%;\n display: flex;\n flex-direction: row;\n align-items: center;\n overflow: hidden;\n justify-content: center;\n white-space: nowrap;\n text-align: center;\n border-radius: 10px;\n transition: all 0.2s;\n margin: ", ";\n padding: ", ";\n background-color: ",
203
+ ";\n\n &:hover {\n cursor: ", ";\n background-color: ",
204
+ ";\n }\n\n &:active {\n cursor: ", ";\n background-color: ",
205
+ ";\n }\n"])), function (props) { return (Boolean(props.margin) ? props.margin : "0px"); }, function (props) { return (Boolean(props.padding) ? props.padding : "0px"); }, function (props) {
206
+ if (props.type === ButtonTypes.Submit) {
207
+ return Colors.Orange;
208
+ }
209
+ return null;
210
+ }, function (props) { return (props.onClick ? "pointer" : null); }, function (props) {
211
+ if (props.onClick && props.type === ButtonTypes.Submit) {
212
+ return lighten(0.025, Colors.Orange);
213
+ }
214
+ return null;
215
+ }, function (props) { return (props.onClick ? "pointer" : null); }, function (props) {
216
+ if (props.onClick && props.type === ButtonTypes.Submit) {
217
+ return darken(0.025, Colors.Orange);
218
+ }
219
+ return null;
220
+ });
221
+ var Text = styled.span(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n font-size: 1.4rem;\n font-weight: 600;\n text-transform: uppercase;\n margin-left: ", ";\n color: ", ";\n"], ["\n font-size: 1.4rem;\n font-weight: 600;\n text-transform: uppercase;\n margin-left: ", ";\n color: ",
222
+ ";\n"])), function (props) { return (props.icon ? "10px" : 0); }, function (props) {
223
+ if (props.type === ButtonTypes.Submit) {
224
+ return Colors.White;
225
+ }
226
+ return null;
227
+ });
228
+ function Button(_a) {
229
+ var _b = _a.type, type = _b === void 0 ? ButtonTypes.Submit : _b, _c = _a.state, state = _c === void 0 ? ButtonStates.Active : _c, text = _a.text, _d = _a.onClick, onClick = _d === void 0 ? function () { } : _d, icon = _a.icon, margin = _a.margin, padding = _a.padding, _e = _a.loading, loading = _e === void 0 ? false : _e;
230
+ return (React.createElement(StyledButton, { type: type, onClick: loading ? null : function () { return onClick(); }, margin: margin, padding: padding, state: state }, (function () {
231
+ return (React.createElement(Fragment, null,
232
+ icon && (React.createElement(Icon, { icon: icon, color: Colors.White })),
233
+ (function () {
234
+ if (loading) {
235
+ return React.createElement(Loader, { size: LoaderSizes.VerySmall });
236
+ }
237
+ return (text && (React.createElement(Text, { type: type, icon: Boolean(icon) }, text)));
238
+ })()));
239
+ })()));
240
+ }
241
+ var templateObject_1$1, templateObject_2;
242
+
237
243
  var Container = styled.div(templateObject_1$2 || (templateObject_1$2 = __makeTemplateObject(["\n position: relative;\n display: flex;\n align-items: center;\n justify-content: space-between;\n width: 85px;\n min-height: 42px;\n /* background-color: red; */\n"], ["\n position: relative;\n display: flex;\n align-items: center;\n justify-content: space-between;\n width: 85px;\n min-height: 42px;\n /* background-color: red; */\n"])));
238
244
  var IconContainer = styled.div(templateObject_2$1 || (templateObject_2$1 = __makeTemplateObject(["\n display: flex;\n align-items: center;\n justify-content: ", ";\n flex: 1;\n /* background-color: blue; */\n height: 100%;\n\n &:hover {\n cursor: ", ";\n }\n\n .svg-inline--fa {\n color: ", " !important;\n }\n"], ["\n display: flex;\n align-items: center;\n justify-content: ", ";\n flex: 1;\n /* background-color: blue; */\n height: 100%;\n\n &:hover {\n cursor: ", ";\n }\n\n .svg-inline--fa {\n color: ",
239
245
  " !important;\n }\n"])), function (props) { return props.justify; }, function (props) { return (props.active ? "pointer" : null); }, function (props) {
package/build/index.js CHANGED
@@ -22,7 +22,9 @@ var PriceUtil = require('@sellout/utils/.dist/price');
22
22
  Colors["Black"] = "#000000";
23
23
  Colors["Green"] = "#419D78";
24
24
  Colors["OffWhite"] = "#FCFCFC";
25
- Colors["Blue"] = "#020151";
25
+ Colors["LightBlue"] = "#39159C";
26
+ Colors["Blue"] = "#2D0E84";
27
+ Colors["DarkBlue"] = "#1D0858";
26
28
  Colors["Red"] = "#E63946";
27
29
  Colors["Orange"] = "#FF700F";
28
30
  Colors["DarkOrange"] = "#D65600";
@@ -80,51 +82,6 @@ function Loader(_a) {
80
82
  }
81
83
  var templateObject_1;
82
84
 
83
- (function (ButtonTypes) {
84
- ButtonTypes["Submit"] = "Submit";
85
- })(exports.ButtonTypes || (exports.ButtonTypes = {}));
86
- (function (ButtonStates) {
87
- ButtonStates["Active"] = "Active";
88
- })(exports.ButtonStates || (exports.ButtonStates = {}));
89
- var StyledButton = styled.div(templateObject_1$1 || (templateObject_1$1 = __makeTemplateObject(["\n position: relative;\n height: 40px;\n width: 100%;\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: center;\n text-align: center;\n border-radius: 10px;\n transition: all 0.2s;\n margin: ", ";\n padding: ", ";\n background-color: ", ";\n\n &:hover {\n cursor: ", ";\n background-color: ", ";\n }\n\n &:active {\n cursor: ", ";\n background-color: ", ";\n }\n"], ["\n position: relative;\n height: 40px;\n width: 100%;\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: center;\n text-align: center;\n border-radius: 10px;\n transition: all 0.2s;\n margin: ", ";\n padding: ", ";\n background-color: ",
90
- ";\n\n &:hover {\n cursor: ", ";\n background-color: ",
91
- ";\n }\n\n &:active {\n cursor: ", ";\n background-color: ",
92
- ";\n }\n"])), function (props) { return (Boolean(props.margin) ? props.margin : "0px"); }, function (props) { return (Boolean(props.padding) ? props.padding : "0px"); }, function (props) {
93
- if (props.type === exports.ButtonTypes.Submit) {
94
- return exports.Colors.Orange;
95
- }
96
- return null;
97
- }, function (props) { return (props.onClick ? "pointer" : null); }, function (props) {
98
- if (props.onClick && props.type === exports.ButtonTypes.Submit) {
99
- return Polished.lighten(0.025, exports.Colors.Orange);
100
- }
101
- return null;
102
- }, function (props) { return (props.onClick ? "pointer" : null); }, function (props) {
103
- if (props.onClick && props.type === exports.ButtonTypes.Submit) {
104
- return Polished.darken(0.025, exports.Colors.Orange);
105
- }
106
- return null;
107
- });
108
- var Text = styled.span(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n font-size: 1.4rem;\n font-weight: 600;\n text-transform: uppercase;\n margin-left: ", ";\n color: ", ";\n"], ["\n font-size: 1.4rem;\n font-weight: 600;\n text-transform: uppercase;\n margin-left: ", ";\n color: ",
109
- ";\n"])), function (props) { return (props.icon ? "10px" : 0); }, function (props) {
110
- if (props.type === exports.ButtonTypes.Submit) {
111
- return exports.Colors.White;
112
- }
113
- return null;
114
- });
115
- function Button(_a) {
116
- var _b = _a.type, type = _b === void 0 ? exports.ButtonTypes.Submit : _b, _c = _a.state, state = _c === void 0 ? exports.ButtonStates.Active : _c, text = _a.text, _d = _a.onClick, onClick = _d === void 0 ? function () { } : _d, icon = _a.icon, margin = _a.margin, padding = _a.padding, _e = _a.loading, loading = _e === void 0 ? false : _e;
117
- return (React__default.createElement(StyledButton, { type: type, onClick: loading ? null : function () { return onClick(); }, margin: margin, padding: padding, state: state }, (function () {
118
- return (React__default.createElement(React.Fragment, null, (function () {
119
- if (loading) {
120
- return React__default.createElement(Loader, { size: exports.LoaderSizes.VerySmall });
121
- }
122
- return (React__default.createElement(Text, { type: type, icon: Boolean(icon) }, text));
123
- })()));
124
- })()));
125
- }
126
- var templateObject_1$1, templateObject_2;
127
-
128
85
  // import { library } from "@fortawesome/fontawesome-svg-core";
129
86
  var IconEnum = {
130
87
  AudienceRegular: proRegularSvgIcons.faUserFriends,
@@ -223,7 +180,8 @@ var IconEnum = {
223
180
 
224
181
  var Icons = IconEnum;
225
182
  function Icon(_a) {
226
- var _b = _a.icon, icon = _b === void 0 ? Icons.AudienceRegular : _b, _c = _a.color, color = _c === void 0 ? exports.Colors.Orange : _c, _d = _a.onClick, onClick = _d === void 0 ? function () { } : _d, _e = _a.size, size = _e === void 0 ? 20 : _e, top = _a.top, left = _a.left, right = _a.right, _f = _a.position, position = _f === void 0 ? 'relative' : _f, zIndex = _a.zIndex;
183
+ var _b = _a.icon, icon = _b === void 0 ? Icons.AudienceRegular : _b, _c = _a.color, color = _c === void 0 ? exports.Colors.Orange : _c, onClick = _a.onClick, _d = _a.size, size = _d === void 0 ? 20 : _d, top = _a.top, left = _a.left, right = _a.right, _e = _a.position, position = _e === void 0 ? 'relative' : _e, zIndex = _a.zIndex, margin = _a.margin;
184
+ var cursor = onClick ? 'pointer' : '';
227
185
  return (React__default.createElement(reactFontawesome.FontAwesomeIcon, { icon: icon, onClick: onClick, style: {
228
186
  color: color,
229
187
  top: top,
@@ -232,10 +190,59 @@ function Icon(_a) {
232
190
  position: position,
233
191
  zIndex: zIndex,
234
192
  fontSize: size,
235
- transition: "all 0.2s"
193
+ transition: "all 0.2s",
194
+ margin: margin,
195
+ cursor: cursor,
236
196
  } }));
237
197
  }
238
198
 
199
+ (function (ButtonTypes) {
200
+ ButtonTypes["Submit"] = "Submit";
201
+ })(exports.ButtonTypes || (exports.ButtonTypes = {}));
202
+ (function (ButtonStates) {
203
+ ButtonStates["Active"] = "Active";
204
+ })(exports.ButtonStates || (exports.ButtonStates = {}));
205
+ var StyledButton = styled.div(templateObject_1$1 || (templateObject_1$1 = __makeTemplateObject(["\n position: relative;\n height: 40px;\n width: 100%;\n display: flex;\n flex-direction: row;\n align-items: center;\n overflow: hidden;\n justify-content: center;\n white-space: nowrap;\n text-align: center;\n border-radius: 10px;\n transition: all 0.2s;\n margin: ", ";\n padding: ", ";\n background-color: ", ";\n\n &:hover {\n cursor: ", ";\n background-color: ", ";\n }\n\n &:active {\n cursor: ", ";\n background-color: ", ";\n }\n"], ["\n position: relative;\n height: 40px;\n width: 100%;\n display: flex;\n flex-direction: row;\n align-items: center;\n overflow: hidden;\n justify-content: center;\n white-space: nowrap;\n text-align: center;\n border-radius: 10px;\n transition: all 0.2s;\n margin: ", ";\n padding: ", ";\n background-color: ",
206
+ ";\n\n &:hover {\n cursor: ", ";\n background-color: ",
207
+ ";\n }\n\n &:active {\n cursor: ", ";\n background-color: ",
208
+ ";\n }\n"])), function (props) { return (Boolean(props.margin) ? props.margin : "0px"); }, function (props) { return (Boolean(props.padding) ? props.padding : "0px"); }, function (props) {
209
+ if (props.type === exports.ButtonTypes.Submit) {
210
+ return exports.Colors.Orange;
211
+ }
212
+ return null;
213
+ }, function (props) { return (props.onClick ? "pointer" : null); }, function (props) {
214
+ if (props.onClick && props.type === exports.ButtonTypes.Submit) {
215
+ return Polished.lighten(0.025, exports.Colors.Orange);
216
+ }
217
+ return null;
218
+ }, function (props) { return (props.onClick ? "pointer" : null); }, function (props) {
219
+ if (props.onClick && props.type === exports.ButtonTypes.Submit) {
220
+ return Polished.darken(0.025, exports.Colors.Orange);
221
+ }
222
+ return null;
223
+ });
224
+ var Text = styled.span(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n font-size: 1.4rem;\n font-weight: 600;\n text-transform: uppercase;\n margin-left: ", ";\n color: ", ";\n"], ["\n font-size: 1.4rem;\n font-weight: 600;\n text-transform: uppercase;\n margin-left: ", ";\n color: ",
225
+ ";\n"])), function (props) { return (props.icon ? "10px" : 0); }, function (props) {
226
+ if (props.type === exports.ButtonTypes.Submit) {
227
+ return exports.Colors.White;
228
+ }
229
+ return null;
230
+ });
231
+ function Button(_a) {
232
+ var _b = _a.type, type = _b === void 0 ? exports.ButtonTypes.Submit : _b, _c = _a.state, state = _c === void 0 ? exports.ButtonStates.Active : _c, text = _a.text, _d = _a.onClick, onClick = _d === void 0 ? function () { } : _d, icon = _a.icon, margin = _a.margin, padding = _a.padding, _e = _a.loading, loading = _e === void 0 ? false : _e;
233
+ return (React__default.createElement(StyledButton, { type: type, onClick: loading ? null : function () { return onClick(); }, margin: margin, padding: padding, state: state }, (function () {
234
+ return (React__default.createElement(React.Fragment, null,
235
+ icon && (React__default.createElement(Icon, { icon: icon, color: exports.Colors.White })),
236
+ (function () {
237
+ if (loading) {
238
+ return React__default.createElement(Loader, { size: exports.LoaderSizes.VerySmall });
239
+ }
240
+ return (text && (React__default.createElement(Text, { type: type, icon: Boolean(icon) }, text)));
241
+ })()));
242
+ })()));
243
+ }
244
+ var templateObject_1$1, templateObject_2;
245
+
239
246
  var Container = styled.div(templateObject_1$2 || (templateObject_1$2 = __makeTemplateObject(["\n position: relative;\n display: flex;\n align-items: center;\n justify-content: space-between;\n width: 85px;\n min-height: 42px;\n /* background-color: red; */\n"], ["\n position: relative;\n display: flex;\n align-items: center;\n justify-content: space-between;\n width: 85px;\n min-height: 42px;\n /* background-color: red; */\n"])));
240
247
  var IconContainer = styled.div(templateObject_2$1 || (templateObject_2$1 = __makeTemplateObject(["\n display: flex;\n align-items: center;\n justify-content: ", ";\n flex: 1;\n /* background-color: blue; */\n height: 100%;\n\n &:hover {\n cursor: ", ";\n }\n\n .svg-inline--fa {\n color: ", " !important;\n }\n"], ["\n display: flex;\n align-items: center;\n justify-content: ", ";\n flex: 1;\n /* background-color: blue; */\n height: 100%;\n\n &:hover {\n cursor: ", ";\n }\n\n .svg-inline--fa {\n color: ",
241
248
  " !important;\n }\n"])), function (props) { return props.justify; }, function (props) { return (props.active ? "pointer" : null); }, function (props) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sellout/ui",
3
- "version": "0.0.9",
3
+ "version": "0.0.12",
4
4
  "main": "build/index.js",
5
5
  "module": "build/index.es.js",
6
6
  "jsnext:main": "build/index.es.js",
@@ -24,7 +24,7 @@
24
24
  "@fortawesome/pro-regular-svg-icons": "^5.12.1",
25
25
  "@fortawesome/pro-solid-svg-icons": "^5.12.1",
26
26
  "@fortawesome/react-fontawesome": "^0.1.9",
27
- "@sellout/utils": "^0.0.9",
27
+ "@sellout/utils": "^0.0.12",
28
28
  "@testing-library/jest-dom": "^4.2.4",
29
29
  "@testing-library/react": "^9.4.0",
30
30
  "@testing-library/user-event": "^7.2.1",
@@ -35,8 +35,6 @@
35
35
  "awesome-typescript-loader": "^5.2.1",
36
36
  "babel-loader": "^8.0.6",
37
37
  "jest": "^24.9.0",
38
- "polished": "^3.4.4",
39
- "react-animate-height": "^2.0.20",
40
38
  "rollup": "^1.27.13",
41
39
  "rollup-plugin-commonjs": "^10.1.0",
42
40
  "rollup-plugin-node-resolve": "^5.2.0",
@@ -46,7 +44,11 @@
46
44
  "ts-jest": "^24.2.0",
47
45
  "typescript": "^3.7.5"
48
46
  },
49
- "gitHead": "c54a032fe5d7b97ad1ac2532edce24854e063180",
47
+ "dependencies": {
48
+ "polished": "^3.4.4",
49
+ "react-animate-height": "^2.0.20"
50
+ },
51
+ "gitHead": "8f06f6b076735d7ad101fcdb3f6c9cd301f78a6a",
50
52
  "peerDependencies": {
51
53
  "react": "^16.13.0",
52
54
  "react-dom": "^16.13.0",
package/src/Colors.ts CHANGED
@@ -3,7 +3,9 @@ export enum Colors {
3
3
  Black = "#000000",
4
4
  Green = "#419D78",
5
5
  OffWhite = "#FCFCFC",
6
- Blue = "#020151",
6
+ LightBlue = '#39159C',
7
+ Blue = "#2D0E84",
8
+ DarkBlue = '#1D0858',
7
9
  Red = "#E63946",
8
10
  Orange = "#FF700F",
9
11
  DarkOrange = "#D65600",
@@ -0,0 +1,4 @@
1
+ <svg width="20" height="32" viewBox="0 0 20 32" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M6.74716 1.41177C3.81431 1.41177 1.41033 3.82962 1.41033 6.81542C1.41033 7.38337 1.49047 7.91886 1.65073 8.43814C2.88477 7.01014 4.71179 6.10142 6.73113 6.10142H12.068V1.42799H6.74716V1.41177ZM1.66676 11.3103C1.50649 11.8296 1.42636 12.3651 1.42636 12.9331C1.42636 15.9026 3.81431 18.3367 6.76319 18.3367H12.1V13.6633H6.74716C4.72782 13.6471 2.9008 12.7383 1.66676 11.3103ZM12.1 19.7647H6.74716C3.02901 19.7647 0 16.6978 0 12.9331C0 11.8296 0.256424 10.7911 0.721193 9.88235C0.256424 8.9574 0 7.91887 0 6.83165C0 3.06694 3.02901 0 6.74716 0H13.4943V7.56187H6.74716C4.93616 7.56187 3.31749 8.48682 2.3559 9.89858C3.31749 11.3103 4.92014 12.2353 6.74716 12.2353H12.1V19.7647Z" fill="white"/>
3
+ <path d="M13.2528 30.5882C16.1857 30.5882 18.5897 28.1704 18.5897 25.1846C18.5897 24.6166 18.5095 24.0811 18.3493 23.5619C17.1152 24.9899 15.2882 25.8986 13.2689 25.8986H7.93204V30.572H13.2528V30.5882ZM18.3332 20.6897C18.4935 20.1704 18.5736 19.6349 18.5736 19.0669C18.5736 16.0974 16.1857 13.6633 13.2368 13.6633L7.89999 13.6633C7.89999 15.4884 7.89999 16.5116 7.89999 18.3367H13.2528C15.2722 18.3529 17.0992 19.2617 18.3332 20.6897ZM7.89999 12.2353H13.2528C16.971 12.2353 20 15.3022 20 19.0669C20 20.1704 19.7436 21.2089 19.2788 22.1176C19.7436 23.0426 20 24.0811 20 25.1684C20 28.9331 16.971 32 13.2528 32L6.50568 32L6.50568 24.4381L13.2528 24.4381C15.0638 24.4381 16.6825 23.5132 17.6441 22.1014C16.6825 20.6897 15.0799 19.7647 13.2528 19.7647H7.89999V12.2353Z" fill="white"/>
4
+ </svg>
@@ -3,7 +3,7 @@ import styled from "styled-components";
3
3
  import * as Polished from "polished";
4
4
  import { Colors } from "../Colors";
5
5
  import Loader, { LoaderSizes } from './Loader';
6
- // import Icon from "./Icon";
6
+ import Icon from "./Icon";
7
7
 
8
8
  export enum ButtonTypes {
9
9
  Submit = "Submit",
@@ -28,7 +28,9 @@ const StyledButton = styled.div<StyledButtonProps>`
28
28
  display: flex;
29
29
  flex-direction: row;
30
30
  align-items: center;
31
+ overflow: hidden;
31
32
  justify-content: center;
33
+ white-space: nowrap;
32
34
  text-align: center;
33
35
  border-radius: 10px;
34
36
  transition: all 0.2s;
@@ -81,11 +83,11 @@ const Text = styled.span<TextProps>`
81
83
  `;
82
84
 
83
85
  export type ButtonProps = {
84
- type: string;
86
+ type?: string;
85
87
  state?: string;
86
- text: string;
88
+ text?: string;
87
89
  onClick?: any;
88
- icon?: string;
90
+ icon?: any;
89
91
  margin?: string;
90
92
  padding?: string;
91
93
  loading?: boolean;
@@ -95,7 +97,7 @@ export default function Button({
95
97
  type = ButtonTypes.Submit,
96
98
  state = ButtonStates.Active,
97
99
  text,
98
- onClick = () => { },
100
+ onClick = () => {},
99
101
  icon,
100
102
  margin,
101
103
  padding,
@@ -112,22 +114,23 @@ export default function Button({
112
114
  {(() => {
113
115
  return (
114
116
  <Fragment>
115
- {/* {icon && (
117
+ {icon && (
116
118
  <Icon
117
119
  icon={icon}
118
- color={Colors.Palette.Orange}
119
- margin="0 10px 0 0"
120
+ color={Colors.White}
120
121
  />
121
- )} */}
122
+ )}
122
123
  {(() => {
123
124
  if (loading) {
124
125
  return <Loader size={LoaderSizes.VerySmall} />
125
126
  }
126
127
 
127
128
  return (
128
- <Text type={type} icon={Boolean(icon)}>
129
- {text}
130
- </Text>
129
+ text && (
130
+ <Text type={type} icon={Boolean(icon)}>
131
+ {text}
132
+ </Text>
133
+ )
131
134
  );
132
135
  })()}
133
136
  </Fragment>
@@ -15,19 +15,22 @@ export type IconProps = {
15
15
  left?: string | number | undefined;
16
16
  right?: string | number | undefined;
17
17
  zIndex?: number | void;
18
+ margin?: string | number | undefined;
18
19
  };
19
20
 
20
21
  export default function Icon({
21
22
  icon = Icons.AudienceRegular,
22
23
  color = Colors.Orange,
23
- onClick = () => {},
24
+ onClick,
24
25
  size = 20,
25
26
  top,
26
27
  left,
27
28
  right,
28
29
  position = 'relative' as any,
29
30
  zIndex,
31
+ margin,
30
32
  }: IconProps) {
33
+ const cursor: string = onClick ? 'pointer' : '';
31
34
 
32
35
  return (
33
36
  <FontAwesomeIcon
@@ -41,7 +44,9 @@ export default function Icon({
41
44
  position: position as any,
42
45
  zIndex: zIndex as any,
43
46
  fontSize: size,
44
- transition: "all 0.2s"
47
+ transition: "all 0.2s",
48
+ margin,
49
+ cursor,
45
50
  }}
46
51
  />
47
52
  );