1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
export default {
contentDependencies: ['generateColorStyleAttribute'],
extraDependencies: ['html', 'language'],
relations: (relation, track) => ({
colorStyle:
relation('generateColorStyleAttribute', track.album.color),
}),
data: (track) => ({
albumName:
track.album.name,
}),
generate: (data, relations, {html, language}) =>
html.tag('a',
{href: '#'},
relations.colorStyle.slot('context', 'primary-only'),
language.sanitize(data.albumName)),
};
|