@eturnity/eturnity_reusable_components 1.1.37 → 1.1.40
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
package/src/App.vue
CHANGED
|
@@ -44,6 +44,8 @@
|
|
|
44
44
|
:value="inputValue"
|
|
45
45
|
@input-change="onInputChange($event)"
|
|
46
46
|
/>
|
|
47
|
+
<br />
|
|
48
|
+
<page-subtitle text="My Subtitle" infoText="My info Text" />
|
|
47
49
|
</page-container>
|
|
48
50
|
</ThemeProvider>
|
|
49
51
|
</template>
|
|
@@ -56,6 +58,7 @@ import MainTable from "@/components/tables/mainTable"
|
|
|
56
58
|
import ThreeDots from "@/components/threeDots"
|
|
57
59
|
import Toggle from "@/components/inputs/toggle"
|
|
58
60
|
import InputNumber from "@/components/inputs/inputNumber"
|
|
61
|
+
import PageSubtitle from "@/components/pageSubtitle"
|
|
59
62
|
// import TableDropdown from "@/components/tableDropdown"
|
|
60
63
|
|
|
61
64
|
const PageContainer = styled.div`
|
|
@@ -71,6 +74,7 @@ export default {
|
|
|
71
74
|
ThreeDots,
|
|
72
75
|
Toggle,
|
|
73
76
|
InputNumber,
|
|
77
|
+
PageSubtitle,
|
|
74
78
|
// TableDropdown,
|
|
75
79
|
},
|
|
76
80
|
data() {
|
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<subtitle-text :color="color"
|
|
2
|
+
<subtitle-text :color="color" :hasInfoText="!!infoText">
|
|
3
|
+
<span>
|
|
4
|
+
{{ text }}
|
|
5
|
+
</span>
|
|
6
|
+
<info-text :text="infoText" v-if="!!infoText" borderColor="#ccc" />
|
|
7
|
+
</subtitle-text>
|
|
3
8
|
</template>
|
|
4
9
|
|
|
5
10
|
<script>
|
|
@@ -8,21 +13,29 @@
|
|
|
8
13
|
// <page-subtitle
|
|
9
14
|
// text="My Page Subitle"
|
|
10
15
|
// color="red"
|
|
16
|
+
// infoText="My info text"
|
|
11
17
|
// />
|
|
12
18
|
import styled from "vue-styled-components"
|
|
19
|
+
import InfoText from "../infoText"
|
|
13
20
|
|
|
14
|
-
const textAttrs = { color: String }
|
|
21
|
+
const textAttrs = { color: String, hasInfoText: Boolean }
|
|
15
22
|
const SubtitleText = styled("div", textAttrs)`
|
|
23
|
+
display: grid;
|
|
24
|
+
grid-gap: 12px;
|
|
25
|
+
grid-template-columns: ${(props) =>
|
|
26
|
+
props.hasInfoText ? "auto auto 1fr" : "1fr"};
|
|
16
27
|
color: ${(props) => (props.color ? props.color : props.theme.colors.gray1)};
|
|
17
28
|
font-size: 13px;
|
|
18
29
|
margin-bottom: 30px;
|
|
19
30
|
line-height: 1.5;
|
|
31
|
+
position: relative;
|
|
20
32
|
`
|
|
21
33
|
|
|
22
34
|
export default {
|
|
23
35
|
name: "page-subtitle",
|
|
24
36
|
components: {
|
|
25
37
|
SubtitleText,
|
|
38
|
+
InfoText,
|
|
26
39
|
},
|
|
27
40
|
props: {
|
|
28
41
|
text: {
|
|
@@ -31,6 +44,10 @@ export default {
|
|
|
31
44
|
color: {
|
|
32
45
|
required: false,
|
|
33
46
|
},
|
|
47
|
+
infoText: {
|
|
48
|
+
required: false,
|
|
49
|
+
default: null,
|
|
50
|
+
},
|
|
34
51
|
},
|
|
35
52
|
}
|
|
36
53
|
</script>
|
|
@@ -49,7 +49,9 @@
|
|
|
49
49
|
@input-change="onCustomInputChange($event)"
|
|
50
50
|
/>
|
|
51
51
|
</input-container>
|
|
52
|
-
<
|
|
52
|
+
<text-container v-else>
|
|
53
|
+
<span> {{ item.value }}</span>
|
|
54
|
+
</text-container>
|
|
53
55
|
</component-item>
|
|
54
56
|
<arrow-container class="arrow-container">
|
|
55
57
|
<arrow-wrapper :showArchived="showArchived">
|
|
@@ -182,7 +184,6 @@ const ComponentItem = styled.td`
|
|
|
182
184
|
|
|
183
185
|
span {
|
|
184
186
|
padding-left: 15px;
|
|
185
|
-
vertical-align: middle;
|
|
186
187
|
}
|
|
187
188
|
}
|
|
188
189
|
`
|
|
@@ -346,6 +347,12 @@ const CustomSubtext = styled.div`
|
|
|
346
347
|
color: ${(props) => props.theme.colors.grey3};
|
|
347
348
|
`
|
|
348
349
|
|
|
350
|
+
const TextContainer = styled.div`
|
|
351
|
+
height: 100%;
|
|
352
|
+
display: grid;
|
|
353
|
+
align-items: center;
|
|
354
|
+
`
|
|
355
|
+
|
|
349
356
|
export default {
|
|
350
357
|
name: "table-dropdown",
|
|
351
358
|
components: {
|
|
@@ -371,6 +378,7 @@ export default {
|
|
|
371
378
|
CustomName,
|
|
372
379
|
CustomSubtext,
|
|
373
380
|
ArrowContainer,
|
|
381
|
+
TextContainer,
|
|
374
382
|
},
|
|
375
383
|
props: {
|
|
376
384
|
colSpan: {
|