Components and their props
List
dense true/false
Makes the list with lesser padding.
two-line true/false
Makes container for two line list item.
avatar-list true/false
Makes the list capable of containing an avatar.
List.Item
List.LinkItem
List.ItemGraphic
List.ItemMeta
List.TextContainer
List.PrimaryText
List.SecondaryText
Sample code
import {h, Component} from 'preact';
import List from 'preact-material-components/List';
import 'preact-material-components/List/style.css';
export default class ListPage extends Component {
render(){
return (
<div>
<List>
<List.Item>Item1</List.Item>
<List.Item>Item2</List.Item>
<List.Item>Item3</List.Item>
<List.Item>Item4</List.Item>
<List.Item>Item5</List.Item>
</List>
</div>
);
}
}
Original documentation
This component encapsulates
mdc-list, you can refer to its documentation
here.
Demo
Normal
- Item1
- Item2
- Item3
- Item4
- Item5
Action items
Two line
- Heading 1Lorem ipsum dolor sit amet.
- Heading 2Lorem ipsum dolor sit amet.
- Heading 3Lorem ipsum dolor sit amet.
Avatar
- folderPhotosJan 9, 2014info
- folderWorkJan 28, 2014info
- folderHawaiFeb 9, 2014info
- folderIndiaMar 28, 2014info