@eturnity/eturnity_reusable_components 1.1.39 → 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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eturnity/eturnity_reusable_components",
3
- "version": "1.1.39",
3
+ "version": "1.1.40",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "dev": "vue-cli-service serve",
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() {
@@ -38,7 +38,7 @@
38
38
  <script>
39
39
  // import InfoText from "@eturnity/eturnity_reusable_components/src/components/infoText"
40
40
  //To use:
41
- // <info-component
41
+ // <info-text
42
42
  // text="Veritatis et quasi architecto beatae vitae"
43
43
  // borderColor="#ccc"
44
44
  // size="20"
@@ -1,5 +1,10 @@
1
1
  <template>
2
- <subtitle-text :color="color">{{ text }}</subtitle-text>
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>