1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
export default {
contentDependencies: ['generateTrackListItem'],
extraDependencies: ['html'],
relations: (relation, tracks) => ({
items:
tracks
.map(track => relation('generateTrackListItem', track, [])),
}),
slots: {
colorMode: {
validate: v => v.is('none', 'track', 'line'),
default: 'track',
},
},
generate: (relations, slots, {html}) =>
html.tag('ul',
{[html.onlyIfContent]: true},
relations.items.map(item =>
item.slots({
showArtists: true,
showDuration: false,
colorMode: slots.colorMode,
}))),
};
|