@eturnity/eturnity_reusable_components 1.2.38 → 1.2.39-EPDM-5626.1

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eturnity/eturnity_reusable_components",
3
- "version": "1.2.38",
3
+ "version": "1.2.39-EPDM-5626.1",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "dev": "vue-cli-service serve",
@@ -1,8 +1,9 @@
1
1
  <template>
2
2
  <page-container>
3
3
  <button-container
4
- :isDisabled="isDisabled"
5
4
  :type="type"
5
+ :minWidth="minWidth"
6
+ :isDisabled="isDisabled"
6
7
  :customColor="customColor"
7
8
  >
8
9
  {{ text }}
@@ -14,37 +15,39 @@
14
15
  // To use:
15
16
  // import MainButton from "@eturnity/eturnity_reusable_components/src/components/buttons/mainButton"
16
17
  // <main-button
17
- // type="secondary" // primary, secondary, cancel
18
- // :isDisabled="true"
19
18
  // text="Click Me"
20
19
  // customColor="#ab5348"
20
+ // type="secondary" // primary, secondary, cancel
21
+ // :isDisabled="true"
22
+ // :minWidth="minWidth"
21
23
  // />
22
24
 
23
25
  import styled from "vue-styled-components"
24
26
 
25
27
  const PageContainer = styled.div``
26
28
 
27
- const ButtonAttrs = { type: String, isDisabled: Boolean, customColor: String }
29
+ const ButtonAttrs = { type: String, isDisabled: Boolean, minWidth: String, customColor: String }
28
30
  const ButtonContainer = styled("div", ButtonAttrs)`
29
31
  padding: 7px 15px;
30
32
  font-size: 13px;
31
33
  color: ${(props) => props.theme.colors.white};
32
34
  background-color: ${(props) =>
33
- props.isDisabled
34
- ? props.theme.colors.disabled
35
- : props.customColor
36
- ? props.customColor
37
- : props.type === "primary"
38
- ? props.theme.colors.black
39
- : props.type === "secondary"
40
- ? props.theme.colors.grey3
41
- : props.type === "cancel"
42
- ? props.theme.colors.red
43
- : props.theme.colors.black};
35
+ props.isDisabled
36
+ ? props.theme.colors.disabled
37
+ : props.customColor
38
+ ? props.customColor
39
+ : props.type === "primary"
40
+ ? props.theme.colors.black
41
+ : props.type === "secondary"
42
+ ? props.theme.colors.grey3
43
+ : props.type === "cancel"
44
+ ? props.theme.colors.red
45
+ : props.theme.colors.black};
44
46
  border-radius: 4px;
45
47
  text-align: center;
46
48
  cursor: ${(props) => (props.isDisabled ? "not-allowed" : "pointer")};
47
49
  user-select: none;
50
+ ${(props) => (props.minWidth ? `min-width: ${props.minWidth};` : '')};
48
51
 
49
52
  &:hover {
50
53
  opacity: ${(props) => (props.isDisabled ? "1" : "0.8")};
@@ -77,6 +80,10 @@ export default {
77
80
  required: false,
78
81
  default: null,
79
82
  },
83
+ minWidth: {
84
+ required: false,
85
+ default: null
86
+ }
80
87
  },
81
88
  }
82
89
  </script>
@@ -226,7 +226,7 @@ const SlotContainer = styled('span', inputProps)`
226
226
  width: ${(props) =>
227
227
  props.slotSize ? 'calc(' + props.slotSize + ' - 10px)' : 'fit-content'};
228
228
  right: 10px;
229
- top: 0;
229
+ top: 10px;
230
230
  padding-left: 10px;
231
231
  color: ${(props) =>
232
232
  props.isError
@@ -74,7 +74,7 @@ const InputLabel = styled('div', labelAttrs)`
74
74
  };
75
75
 
76
76
  font-size: ${(props) => (props.fontSize ? props.fontSize : '13px')};
77
- font-weight: 700;
77
+ font-family: 'Lato-Bold',Arial;
78
78
  `
79
79
 
80
80
  const LabelWrapper = styled.div`
@@ -133,15 +133,15 @@ const InputContainer = styled('input', inputProps)`
133
133
  : props.fontColor
134
134
  ? props.fontColor + ' !important'
135
135
  : props.theme.colors.black};
136
-
136
+
137
137
  width: ${(props) => (props.inputWidth ? props.inputWidth : '100%')};
138
138
  min-width: ${(props) => (props.minWidth ? props.minWidth : 'unset')};
139
139
  max-height: ${(props) => props.inputHeight};
140
140
  box-sizing: border-box; // to allow width of 100% with padding
141
- font-weight: 500;
141
+ font-weight: 400;
142
142
  cursor: ${(props) => (props.isDisabled ? 'not-allowed' : 'auto')};
143
143
  background-color: ${(props) =>
144
- props.isDisabled ? props.theme.colors.grey5 :
144
+ props.isDisabled ? props.theme.colors.grey5 :
145
145
  props.backgroundColor ? props.backgroundColor+' !important' :
146
146
  props.theme.colors.white};
147
147
  &::placeholder {