@eturnity/eturnity_reusable_components 7.24.1-EPDM-10857.1 → 7.24.1-EPDM-10857.2
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,11 +1,19 @@
|
|
1
1
|
<template>
|
2
2
|
<div>
|
3
|
-
<Text :expand="showButton && showAll">{{ text }}</Text>
|
3
|
+
<Text :expand="showButton && showAll" :fontSize="fontSize">{{ text }}</Text>
|
4
4
|
<ToggleContainer>
|
5
|
-
<ToggleButton
|
5
|
+
<ToggleButton
|
6
|
+
@click="toggleHandler"
|
7
|
+
v-if="showButton && !showAll"
|
8
|
+
:fontSize="fontSize"
|
9
|
+
>
|
6
10
|
{{ $gettext('Show more') }}
|
7
11
|
</ToggleButton>
|
8
|
-
<ToggleButton
|
12
|
+
<ToggleButton
|
13
|
+
@click="toggleHandler"
|
14
|
+
v-if="showButton && showAll"
|
15
|
+
:fontSize="fontSize"
|
16
|
+
>
|
9
17
|
{{ $gettext('Show less') }}
|
10
18
|
</ToggleButton>
|
11
19
|
</ToggleContainer>
|
@@ -17,7 +25,8 @@ import styled from 'vue3-styled-components'
|
|
17
25
|
import theme from '@/assets/theme.js'
|
18
26
|
|
19
27
|
const TextAttrs = {
|
20
|
-
expand: Boolean
|
28
|
+
expand: Boolean,
|
29
|
+
fontSize: String
|
21
30
|
}
|
22
31
|
const Text = styled('p', TextAttrs)`
|
23
32
|
display: block;
|
@@ -26,6 +35,7 @@ const Text = styled('p', TextAttrs)`
|
|
26
35
|
-webkit-line-clamp: ${(props) => (props.expand ? 'unset' : '4')};
|
27
36
|
-webkit-box-orient: vertical;
|
28
37
|
overflow: hidden;
|
38
|
+
font-size: ${(props) => props.fontSize}px;
|
29
39
|
text-overflow: ellipsis;
|
30
40
|
`
|
31
41
|
|
@@ -34,7 +44,8 @@ const ToggleContainer = styled.div`
|
|
34
44
|
width: 100%;
|
35
45
|
`
|
36
46
|
|
37
|
-
const ToggleButton = styled
|
47
|
+
const ToggleButton = styled('p', TextAttrs)`
|
48
|
+
font-size: ${(props) => props.fontSize}px;
|
38
49
|
cursor: pointer;
|
39
50
|
color: ${(props) => props.theme.colors.blue};
|
40
51
|
`
|
@@ -46,6 +57,10 @@ export default {
|
|
46
57
|
type: String,
|
47
58
|
required: true
|
48
59
|
},
|
60
|
+
fontSize: {
|
61
|
+
type: String,
|
62
|
+
default: '16px'
|
63
|
+
},
|
49
64
|
lineCount: {
|
50
65
|
type: Number,
|
51
66
|
default: 3
|