Open and close expanded tiles
PreviousHow to change the contents of an expanded tileNextHow to localise the load more button on widgets
Last updated
import { ISdk } from "@stackla/widget-utils"
declare const sdk: ISdk
sdk.querySelectorAll(".tile").forEach(tile => {
tile.addEventListener("click", () => {
const tileId = tile.getAttribute("data-tile-id")
sdk.openExpandedTile(tileId)
})
})
setTimeout(() => {
sdk.closeExpandedTile()
}, 5000)