@eturnity/eturnity_reusable_components 1.2.38 → 1.2.39-EPDM-5626
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,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
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
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:
|
229
|
+
top: 10px;
|
230
230
|
padding-left: 10px;
|
231
231
|
color: ${(props) =>
|
232
232
|
props.isError
|