https://discord.umbraco.com logo
I'm creating a new package and really struggling w...
# package-development
i
I'm creating a new package and really struggling with all the uui components and understanding what properties / events each one has. For instance I've got a grid of uui-card-media rendering with this:
return html
<uui-card-media .name = ${ item.snippet.title } data-mark="${item.kind}:${item.id.videoId}" class=${this._selectedItem === item ? 'selected' : ''} @click=${() => this.#onSelected(item)} > <img src="${item.snippet.thumbnails !== null && item.snippet.thumbnails.default !== null ? item.snippet.thumbnails.default.url : ""}" alt="${item.snippet.title}" />
;
and my event like this:
Copy code
#onSelected(item) {
    debugger;
    this._selectedItem = item;
    console.log('Selected item:', item);
    this._onSelectedItem(item);
  }
but nothing seems to happen. I've checked the storybook docs, but their all a bit light on info!!! Any ideas?
3 Views