@eturnity/eturnity_reusable_components 1.1.67 → 1.1.70

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.67",
3
+ "version": "1.1.70",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "dev": "vue-cli-service serve",
package/src/App.vue CHANGED
@@ -55,12 +55,7 @@
55
55
  size="small"
56
56
  :isDisabled="false"
57
57
  />
58
- <main-button
59
- text="Click me!"
60
- :isDisabled="false"
61
- type="primary"
62
- @click.native="onClickButton()"
63
- />
58
+ <external-button text="Click me!" minWidth="500px" />
64
59
  </page-container>
65
60
  </ThemeProvider>
66
61
  </template>
@@ -76,7 +71,7 @@ import InputNumber from "@/components/inputs/inputNumber"
76
71
  import Checkbox from "@/components/inputs/checkbox"
77
72
  import PageSubtitle from "@/components/pageSubtitle"
78
73
  import Spinner from "@/components/spinner"
79
- import MainButton from "@/components/buttons/mainButton"
74
+ import ExternalButton from "@/components/buttons/externalButton"
80
75
  // import TableDropdown from "@/components/tableDropdown"
81
76
 
82
77
  const PageContainer = styled.div`
@@ -95,7 +90,7 @@ export default {
95
90
  PageSubtitle,
96
91
  Spinner,
97
92
  Checkbox,
98
- MainButton,
93
+ ExternalButton,
99
94
  // TableDropdown,
100
95
  },
101
96
  data() {
@@ -0,0 +1,6 @@
1
+ <svg width="30" height="30" viewBox="0 0 30 30" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M0 4C0 1.79086 1.79086 0 4 0H30V30H4C1.79086 30 0 28.2091 0 26V4Z" fill="white" fill-opacity="0.1"/>
3
+ <path d="M20.65 22H9.24995C8.54995 22 7.94995 21.4 7.94995 20.7V9.3C7.94995 8.6 8.54995 8 9.24995 8H13.95V10H10.85C10.35 10 9.94995 10.4 9.94995 10.9V19.2C9.94995 19.6 10.35 20 10.85 20H19.15C19.65 20 20.05 19.6 20.05 19.1V16H22.05V20.7C21.95 21.4 21.35 22 20.65 22Z" fill="white"/>
4
+ <path d="M15.95 8H21.95V14L15.95 8Z" fill="white"/>
5
+ <path d="M20.809 10.6108L19.3948 9.19659L12.2531 16.3383L13.6673 17.7525L20.809 10.6108Z" fill="white"/>
6
+ </svg>
@@ -0,0 +1,101 @@
1
+ <template>
2
+ <page-container>
3
+ <button-wrapper
4
+ :isDisabled="isDisabled"
5
+ :minWidth="minWidth"
6
+ :customColor="customColor"
7
+ >
8
+ <icon-container>
9
+ <icon-element
10
+ :src="require('../../../assets/icons/external_icon.svg')"
11
+ />
12
+ </icon-container>
13
+ <button-container>{{ text }}</button-container>
14
+ </button-wrapper>
15
+ </page-container>
16
+ </template>
17
+
18
+ <script>
19
+ // import ExternalButton from "@eturnity/eturnity_reusable_components/src/components/buttons/externalButton"
20
+ // <main-button
21
+ // :isDisabled="true"
22
+ // text="Click Me"
23
+ // minWidth="300px"
24
+ // customColor="#000"
25
+ // />
26
+
27
+ import styled from "vue-styled-components"
28
+
29
+ const PageContainer = styled.div``
30
+
31
+ const ButtonAttrs = {
32
+ isDisabled: Boolean,
33
+ minWidth: String,
34
+ customColor: String,
35
+ }
36
+ const ButtonWrapper = styled("div", ButtonAttrs)`
37
+ display: grid;
38
+ grid-template-columns: auto 1fr;
39
+ background-color: ${(props) =>
40
+ props.isDisabled
41
+ ? props.theme.colors.disabled
42
+ : props.customColor
43
+ ? props.customColor
44
+ : props.theme.colors.yellow};
45
+ cursor: ${(props) => (props.isDisabled ? "not-allowed" : "pointer")};
46
+ user-select: none;
47
+ border-radius: 4px;
48
+ min-width: ${(props) => (props.minWidth ? props.minWidth : "initial")};
49
+
50
+ &:hover {
51
+ opacity: ${(props) => (props.isDisabled ? "1" : "0.8")};
52
+ }
53
+
54
+ &:active {
55
+ opacity: 1;
56
+ }
57
+ `
58
+
59
+ const ButtonContainer = styled.div`
60
+ padding: 7px 15px;
61
+ font-size: 13px;
62
+ color: ${(props) => props.theme.colors.white};
63
+ text-align: center;
64
+ `
65
+
66
+ const IconContainer = styled.div`
67
+ display: grid;
68
+ align-items: center;
69
+ justify-items: center;
70
+ `
71
+
72
+ const IconElement = styled.img``
73
+
74
+ export default {
75
+ name: "external-button",
76
+ components: {
77
+ PageContainer,
78
+ ButtonContainer,
79
+ ButtonWrapper,
80
+ IconContainer,
81
+ IconElement,
82
+ },
83
+ props: {
84
+ isDisabled: {
85
+ required: false,
86
+ default: false,
87
+ },
88
+ text: {
89
+ required: true,
90
+ },
91
+ minWidth: {
92
+ required: false,
93
+ default: null,
94
+ },
95
+ customColor: {
96
+ required: false,
97
+ default: null,
98
+ },
99
+ },
100
+ }
101
+ </script>
@@ -43,7 +43,7 @@ const Container = styled.div`
43
43
  const labelAttrs = { fontSize: String }
44
44
  const InputLabel = styled("div", labelAttrs)`
45
45
  font-weight: bold;
46
- font-size: ${(props) => (props.fontSize ? props.fontSize : "16px")};
46
+ font-size: ${(props) => (props.fontSize ? props.fontSize : "13px")};
47
47
  `
48
48
 
49
49
  const LabelWrapper = styled.div`
@@ -56,7 +56,6 @@ const LabelWrapper = styled.div`
56
56
  grid-template-columns: auto 1fr;
57
57
  grid-gap: 12px;
58
58
  align-items: center;
59
- margin-bottom: 12px;
60
59
  `
61
60
 
62
61
  const inputProps = {