File tree Expand file tree Collapse file tree 3 files changed +8
-6
lines changed Expand file tree Collapse file tree 3 files changed +8
-6
lines changed Original file line number Diff line number Diff line change 50
50
51
51
< div class ="container ">
52
52
< h1 > Tab Group</ h1 >
53
-
53
+ < div style =" background-color: var(--grey-10-color); padding: 5px; " >
54
54
< wc-tab-group backgroundColor ="light ">
55
55
< wc-tab name ="tab-tables " selected > Tables</ wc-tab >
56
56
< wc-tab name ="tab-buttons "> Buttons</ wc-tab >
57
57
< wc-tab name ="tab-badges "> Badges</ wc-tab >
58
58
< wc-tab name ="tab-icons "> Icons</ wc-tab >
59
- < wc-tab name ="tab-disabled " disabled > Disabled</ wc-tab >
59
+ < wc-tab name ="tab-disabled " disabled > < wc-icon name =" person-circle " size =" medium " > </ wc-icon > Disabled</ wc-tab >
60
60
</ wc-tab-group >
61
61
</ div >
62
+ </ div >
62
63
< hr >
63
64
64
65
< div class ="container ">
Original file line number Diff line number Diff line change @@ -52,7 +52,10 @@ export class TabElement extends LitElement {
52
52
static get styles ( ) {
53
53
return css `
54
54
li {
55
- text-align: center;
55
+ vertical-align: middle;
56
+ }
57
+ li.selected {
58
+ border-bottom: 2px solid var(--error-color);
56
59
}
57
60
` ;
58
61
}
Original file line number Diff line number Diff line change @@ -142,11 +142,9 @@ export class TabGroupElement extends LitElement {
142
142
tabs . forEach ( ( tab ) => {
143
143
if ( tab . name === name && ! tab . disabled ) {
144
144
if ( ! tab . selected ) {
145
- console . log ( 'SELECT' , tab . name ) ;
146
- tab . selected = true ;
145
+ tab . setAttribute ( 'selected' , true ) ;
147
146
}
148
147
} else if ( tab . selected ) {
149
- console . log ( 'DESELECT' , tab . name ) ;
150
148
tab . selected = false ;
151
149
}
152
150
} ) ;
You can’t perform that action at this time.
0 commit comments