Skip to content

Commit

Permalink
🚧 WIP Add random button, not working smoothly
Browse files Browse the repository at this point in the history
  • Loading branch information
fre-ben committed Feb 14, 2021
1 parent a599a01 commit 79c3d9f
Showing 1 changed file with 20 additions and 2 deletions.
22 changes: 20 additions & 2 deletions src/pages/catlinez/catlinez.stories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,28 @@ export default {
};

export const catlinez = (args, { loaded: { cat, headline } }) => {
return createElement("div", {
const test = displayCat(cat);

const randomButton = createElement("button", {
className: "randomButton",
innerText: "Refresh",
onclick: async () => {
// location.reload();
// buildCatlinez.replaceChild(test, buildCatlinez.childNodes[1]);
},
});

const buildCatlinez = createElement("div", {
className: "catlinez__container",
childs: [displayHeader(), displayCat(cat), displayGermanHeadline(headline)],
childs: [
displayHeader(),
test,
displayGermanHeadline(headline),
randomButton,
],
});

return buildCatlinez;
};

catlinez.loaders = [
Expand Down

0 comments on commit 79c3d9f

Please sign in to comment.