@eturnity/eturnity_reusable_components 1.0.25 → 1.0.26
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
|
<template>
|
|
2
2
|
<container>
|
|
3
|
-
<flex-wrapper>
|
|
3
|
+
<flex-wrapper :size="size">
|
|
4
4
|
<label-text v-if="labelAlign === 'left'" :size="size">{{
|
|
5
5
|
label
|
|
6
6
|
}}</label-text>
|
|
@@ -19,9 +19,12 @@
|
|
|
19
19
|
:size="size"
|
|
20
20
|
/>
|
|
21
21
|
</toggle-wrapper>
|
|
22
|
-
<label-text
|
|
23
|
-
|
|
24
|
-
|
|
22
|
+
<label-text
|
|
23
|
+
v-if="labelAlign === 'right'"
|
|
24
|
+
:size="size"
|
|
25
|
+
:fontColor="fontColor"
|
|
26
|
+
>{{ label }}</label-text
|
|
27
|
+
>
|
|
25
28
|
</flex-wrapper>
|
|
26
29
|
</container>
|
|
27
30
|
</template>
|
|
@@ -37,6 +40,7 @@
|
|
|
37
40
|
// size="small" // small, medium
|
|
38
41
|
// backgroundColor="blue"
|
|
39
42
|
// labelAlign="right"
|
|
43
|
+
// fontColor="black"
|
|
40
44
|
// />
|
|
41
45
|
|
|
42
46
|
import styled from "vue-styled-components"
|
|
@@ -45,16 +49,23 @@ const Container = styled.div`
|
|
|
45
49
|
display: inline-block;
|
|
46
50
|
`
|
|
47
51
|
|
|
48
|
-
const
|
|
52
|
+
const flexAttrs = { size: String }
|
|
53
|
+
const FlexWrapper = styled("div", flexAttrs)`
|
|
49
54
|
display: grid;
|
|
50
55
|
grid-template-columns: auto 1fr;
|
|
51
|
-
grid-gap:
|
|
56
|
+
grid-gap: ${(props) =>
|
|
57
|
+
props.size === "medium"
|
|
58
|
+
? "20px"
|
|
59
|
+
: props.size === "small"
|
|
60
|
+
? "10px"
|
|
61
|
+
: "20px"};
|
|
52
62
|
align-items: center;
|
|
53
63
|
`
|
|
54
64
|
|
|
55
|
-
const toggleAttrs = { size: String }
|
|
65
|
+
const toggleAttrs = { size: String, fontColor: String }
|
|
56
66
|
const LabelText = styled("div", toggleAttrs)`
|
|
57
|
-
color: ${(props) =>
|
|
67
|
+
color: ${(props) =>
|
|
68
|
+
props.fontColor ? props.fontColor : props.theme.colors.darkGray};
|
|
58
69
|
font-size: ${(props) =>
|
|
59
70
|
props.size === "medium"
|
|
60
71
|
? "16px"
|
|
@@ -181,6 +192,9 @@ export default {
|
|
|
181
192
|
required: false,
|
|
182
193
|
default: "right",
|
|
183
194
|
},
|
|
195
|
+
fontColor: {
|
|
196
|
+
required: false,
|
|
197
|
+
},
|
|
184
198
|
},
|
|
185
199
|
methods: {
|
|
186
200
|
onToggleChange() {
|