File tree Expand file tree Collapse file tree 5 files changed +53
-20
lines changed Expand file tree Collapse file tree 5 files changed +53
-20
lines changed Original file line number Diff line number Diff line change 8
8
class:mdc-list--dense ={dense }
9
9
class:mdc-list--avatar-list ={avatarList }
10
10
class:mdc-list--two-line ={twoLine }
11
- class:mdc -list--three-line ={threeLine }
11
+ class:smui -list--three-line ={threeLine && ! twoLine }
12
12
on:MDCList:action ={handleAction }
13
13
{...props }
14
14
><slot ></slot ></nav >
22
22
class:mdc-list--dense ={dense }
23
23
class:mdc-list--avatar-list ={avatarList }
24
24
class:mdc-list--two-line ={twoLine }
25
- class:mdc -list--three-line ={threeLine }
25
+ class:smui -list--three-line ={threeLine && ! twoLine }
26
26
{role }
27
27
on:MDCList:action ={handleAction }
28
28
{...props }
Original file line number Diff line number Diff line change
1
+ /*
2
+ Temporary addition until support for three-line added to @material
3
+ https://github.com/material-components/material-components-web/issues/31
4
+ */
5
+ @import " @material/feature-targeting/functions" ;
6
+ @import " @material/feature-targeting/mixins" ;
7
+
8
+ @mixin smui-list-core-styles ($query : mdc-feature-all ()) {
9
+ $feat-structure : mdc-feature-create-target ($query , structure );
10
+
11
+ .smui-list--three-line .mdc-list-item__text {
12
+ @include mdc-feature-targets ($feat-structure ) {
13
+ align-self : flex-start ;
14
+ }
15
+ }
16
+
17
+ .smui-list--three-line .mdc-list-item {
18
+ @include mdc-feature-targets ($feat-structure ) {
19
+ height : 88px ;
20
+ }
21
+ }
22
+
23
+ .smui-list--three-line.mdc-list--dense .mdc-list-item {
24
+ @include mdc-feature-targets ($feat-structure ) {
25
+ height : 76px ;
26
+ }
27
+ }
28
+ }
Original file line number Diff line number Diff line change 1
1
@import " @material/list/mdc-list" ;
2
2
@import " @smui/ripple/style" ;
3
-
4
-
5
- /*
6
- Temporary addition until support for three-line added to @material
7
- https://github.com/material-components/material-components-web/issues/31
8
- */
9
- .mdc-list--three-line .mdc-list-item__text {
10
- align-self : flex-start ;
11
- }
12
-
13
- .mdc-list--three-line .mdc-list-item {
14
- height : 88px ;
15
- }
16
-
17
- .mdc-list--three-line.mdc-list--dense .mdc-list-item ,
18
- .mdc-list--avatar-list.mdc-list--dense .mdc-list-item {
19
- height : 76px ;
20
- }
3
+ @import " ./mixins" ;
4
+ @include smui-list-core-styles ;
Original file line number Diff line number Diff line change 28
28
},
29
29
"license" : " Apache-2.0" ,
30
30
"dependencies" : {
31
+ "@material/feature-targeting" : " ^3.1.0" ,
31
32
"@material/list" : " ^3.1.0" ,
32
33
"@smui/common" : " ^1.0.0-beta.15" ,
33
34
"@smui/ripple" : " ^1.0.0-beta.16"
Original file line number Diff line number Diff line change 73
73
74
74
<pre class ="status" >Selected: {selectionTwoLine }, value of selectedIndex: {selectionIndex }</pre >
75
75
76
+ <div >
77
+ A three-line list:
78
+ <List class =" demo-list" threeLine nonInteractive >
79
+ <Item >
80
+ <Text >
81
+ <PrimaryText >FruitPhone 11</PrimaryText >
82
+ <SecondaryText >$1,100</SecondaryText >
83
+ <SecondaryText >A beautiful phone with good specs.</SecondaryText >
84
+ </Text >
85
+ </Item >
86
+ <Item >
87
+ <Text >
88
+ <PrimaryText >Addition Phone</PrimaryText >
89
+ <SecondaryText >$700</SecondaryText >
90
+ <SecondaryText >Pretty much the same phone, but a different brand name and OS.</SecondaryText >
91
+ </Text >
92
+ </Item >
93
+ </List >
94
+ </div >
95
+
76
96
<div >
77
97
A list group:
78
98
<Group >
You can’t perform that action at this time.
0 commit comments