@eturnity/eturnity_reusable_components 7.45.2 → 7.45.3
Sign up to get free protection for your applications and to get access to all the features.
package/package.json
CHANGED
@@ -1,6 +1,10 @@
|
|
1
1
|
<template>
|
2
|
-
<InfoContainer
|
3
|
-
|
2
|
+
<InfoContainer
|
3
|
+
background-color="backgrounColor"
|
4
|
+
:border-color="borderColor"
|
5
|
+
:has-dashed-border="hasDashedBorder"
|
6
|
+
>
|
7
|
+
<RCIcon :color="color" name="info" size="24px" />
|
4
8
|
<TextContainer>
|
5
9
|
<slot></slot>
|
6
10
|
</TextContainer>
|
@@ -10,12 +14,24 @@
|
|
10
14
|
<script>
|
11
15
|
import styled from 'vue3-styled-components'
|
12
16
|
import RCIcon from '../icon'
|
13
|
-
|
14
|
-
|
17
|
+
const propsContainer = {
|
18
|
+
backgroundColor: String,
|
19
|
+
hasDashedBorder: Boolean,
|
20
|
+
borderColor: String,
|
21
|
+
}
|
22
|
+
const InfoContainer = styled('div', propsContainer)`
|
15
23
|
display: flex;
|
16
24
|
gap: 15px;
|
17
|
-
padding:
|
18
|
-
border: 1px
|
25
|
+
padding: 15px;
|
26
|
+
border: 1px ${(props) => (props.hasDashedBorder ? 'dashed' : 'solid')}
|
27
|
+
${(props) =>
|
28
|
+
props.theme.colors[props.borderColor]
|
29
|
+
? props.theme.colors[props.borderColor]
|
30
|
+
: props.borderColor};
|
31
|
+
background-color: ${(props) =>
|
32
|
+
props.theme.colors[props.backgroundColor]
|
33
|
+
? props.theme.colors[props.backgroundColor]
|
34
|
+
: props.backgroundColor};
|
19
35
|
border-radius: 4px;
|
20
36
|
`
|
21
37
|
|
@@ -33,8 +49,19 @@
|
|
33
49
|
},
|
34
50
|
props: {
|
35
51
|
color: {
|
36
|
-
required: false
|
37
|
-
}
|
38
|
-
|
52
|
+
required: false,
|
53
|
+
},
|
54
|
+
backgrounColor: {
|
55
|
+
required: false,
|
56
|
+
},
|
57
|
+
hasDashedBorder: {
|
58
|
+
required: false,
|
59
|
+
default: true,
|
60
|
+
},
|
61
|
+
borderColor: {
|
62
|
+
required: false,
|
63
|
+
default: 'grey4',
|
64
|
+
},
|
65
|
+
},
|
39
66
|
}
|
40
67
|
</script>
|