@eturnity/eturnity_reusable_components 1.1.67 → 1.1.68
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
|
@@ -55,12 +55,7 @@
|
|
|
55
55
|
size="small"
|
|
56
56
|
:isDisabled="false"
|
|
57
57
|
/>
|
|
58
|
-
<
|
|
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
|
|
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
|
-
|
|
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,84 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<page-container>
|
|
3
|
+
<button-wrapper :isDisabled="isDisabled" :minWidth="minWidth">
|
|
4
|
+
<icon-container>
|
|
5
|
+
<icon-element
|
|
6
|
+
:src="require('../../../assets/icons/external_icon.svg')"
|
|
7
|
+
/>
|
|
8
|
+
</icon-container>
|
|
9
|
+
<button-container>{{ text }}</button-container>
|
|
10
|
+
</button-wrapper>
|
|
11
|
+
</page-container>
|
|
12
|
+
</template>
|
|
13
|
+
|
|
14
|
+
<script>
|
|
15
|
+
// import ExternalButton from "@eturnity/eturnity_reusable_components/src/components/buttons/externalButton"
|
|
16
|
+
// <main-button
|
|
17
|
+
// :isDisabled="true"
|
|
18
|
+
// text="Click Me"
|
|
19
|
+
// minWidth="300px"
|
|
20
|
+
// />
|
|
21
|
+
|
|
22
|
+
import styled from "vue-styled-components"
|
|
23
|
+
|
|
24
|
+
const PageContainer = styled.div``
|
|
25
|
+
|
|
26
|
+
const ButtonAttrs = { isDisabled: Boolean, minWidth: String }
|
|
27
|
+
const ButtonWrapper = styled("div", ButtonAttrs)`
|
|
28
|
+
display: grid;
|
|
29
|
+
grid-template-columns: auto 1fr;
|
|
30
|
+
background-color: ${(props) =>
|
|
31
|
+
props.isDisabled ? props.theme.colors.disabled : props.theme.colors.yellow};
|
|
32
|
+
cursor: ${(props) => (props.isDisabled ? "not-allowed" : "pointer")};
|
|
33
|
+
user-select: none;
|
|
34
|
+
border-radius: 4px;
|
|
35
|
+
min-width: ${(props) => (props.minWidth ? props.minWidth : "initial")};
|
|
36
|
+
|
|
37
|
+
&:hover {
|
|
38
|
+
opacity: ${(props) => (props.isDisabled ? "1" : "0.8")};
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
&:active {
|
|
42
|
+
opacity: 1;
|
|
43
|
+
}
|
|
44
|
+
`
|
|
45
|
+
|
|
46
|
+
const ButtonContainer = styled.div`
|
|
47
|
+
padding: 7px 15px;
|
|
48
|
+
font-size: 13px;
|
|
49
|
+
color: ${(props) => props.theme.colors.white};
|
|
50
|
+
text-align: center;
|
|
51
|
+
`
|
|
52
|
+
|
|
53
|
+
const IconContainer = styled.div`
|
|
54
|
+
display: grid;
|
|
55
|
+
align-items: center;
|
|
56
|
+
justify-items: center;
|
|
57
|
+
`
|
|
58
|
+
|
|
59
|
+
const IconElement = styled.img``
|
|
60
|
+
|
|
61
|
+
export default {
|
|
62
|
+
name: "external-button",
|
|
63
|
+
components: {
|
|
64
|
+
PageContainer,
|
|
65
|
+
ButtonContainer,
|
|
66
|
+
ButtonWrapper,
|
|
67
|
+
IconContainer,
|
|
68
|
+
IconElement,
|
|
69
|
+
},
|
|
70
|
+
props: {
|
|
71
|
+
isDisabled: {
|
|
72
|
+
required: false,
|
|
73
|
+
default: false,
|
|
74
|
+
},
|
|
75
|
+
text: {
|
|
76
|
+
required: true,
|
|
77
|
+
},
|
|
78
|
+
minWidth: {
|
|
79
|
+
required: false,
|
|
80
|
+
default: null,
|
|
81
|
+
},
|
|
82
|
+
},
|
|
83
|
+
}
|
|
84
|
+
</script>
|