// Library item var LibraryItem = { template: `
{{title}}
{{author}}
`, props: ['title', 'author', 'image', 'url', 'prefix', 'spinner'], methods: { onClick: function() { this.$emit('clicked'); }, onImageError: function() { this.$emit('imageerror'); } } } // Library Viewer component var LibraryViewer = { components: {'library-item': LibraryItem}, template: `
`, props: ['library'], methods: { bookClicked: function(book) { this.$emit('bookselected', book); } } };