File tree Expand file tree Collapse file tree 3 files changed +59
-1
lines changed
src/components/atoms/text Expand file tree Collapse file tree 3 files changed +59
-1
lines changed Original file line number Diff line number Diff line change 227
227
& -italic {
228
228
--h-text--font-style : italic ;
229
229
}
230
+ & -ellipsis-nowrap {
231
+ display : -webkit-box ;
232
+ -webkit-line-clamp : 1 ;
233
+ -webkit-box-orient : vertical ;
234
+ overflow : hidden ;
235
+ text-overflow : ellipsis ;
236
+ }
237
+ & -link {
238
+ cursor : pointer ;
239
+
240
+ & :hover {
241
+ text-decoration : underline ;
242
+ }
243
+ }
244
+ & -dynamic {
245
+ & > a {
246
+ cursor : pointer ;
247
+ color : var (--color-theme-secondary );
248
+ font-weight : 500 ;
249
+
250
+ & :hover {
251
+ text-decoration : underline ;
252
+ }
253
+ }
254
+ & > i {
255
+ font-style : italic ;
256
+ }
257
+ & > strong ,
258
+ & > b {
259
+ font-weight : 700 ;
260
+ }
261
+ }
230
262
}
231
263
}
Original file line number Diff line number Diff line change @@ -90,6 +90,8 @@ import HText from './text.vue';
90
90
91
91
### Tag use:
92
92
93
+ Exemplo: normal html tags ou router link.
94
+
93
95
<Canvas >
94
96
<Story name = " Tag use" >
95
97
{ {
@@ -173,7 +175,9 @@ import HText from './text.vue';
173
175
<h-text weight="medium">Medium</h-text>
174
176
<h-text weight="bold">Bold</h-text>
175
177
<h-text italic>Italic</h-text>
176
- <h-text link tag="a" href="https://hyone-core-ui.netlify.app/">Link</h-text>
178
+ <h-text ellipsis-nowrap style="width: 150px;">ellipsisNowrap example</h-text>
179
+ <h-text dynamic><b>Italic</b> <i>italic</i> <a>link</a></h-text>
180
+ <h-text link tag="a" href="#">Link</h-text>
177
181
</div>
178
182
` ,
179
183
}}
Original file line number Diff line number Diff line change 8
8
[`h-text--align-${align}`]: align != 'inherit',
9
9
[`h-text--weight-${weight}`]: weight != 'inherit',
10
10
[`h-text--behavior-italic`]: italic,
11
+ [`h-text--behavior-ellipsis-nowrap`]: ellipsisNowrap,
12
+ [`h-text--behavior-link`]: link,
13
+ [`h-text--behavior-dynamic`]: dynamic,
11
14
[`h-text--color-${color}`]: color != 'inherit',
12
15
[`h-text--emphasis-${emphasis}`]: emphasis != 'inherit',
13
16
}"
17
+ :href =" href"
18
+ :to =" href"
14
19
>
15
20
<slot />
16
21
</component >
@@ -97,6 +102,7 @@ export default {
97
102
' a' ,
98
103
' strong' ,
99
104
' caption' ,
105
+ ' router-link' ,
100
106
]),
101
107
},
102
108
align: {
@@ -140,6 +146,22 @@ export default {
140
146
type: Boolean ,
141
147
default: false ,
142
148
},
149
+ href: {
150
+ type: String ,
151
+ default: null ,
152
+ },
153
+ ellipsisNowrap: {
154
+ type: Boolean ,
155
+ default: false ,
156
+ },
157
+ link: {
158
+ type: Boolean ,
159
+ default: false ,
160
+ },
161
+ dynamic: {
162
+ type: Boolean ,
163
+ default: false ,
164
+ },
143
165
},
144
166
};
145
167
</script >
You can’t perform that action at this time.
0 commit comments