Skip to content

Commit

Permalink
* fix: add basic.tsx, which was missing (#47)
Browse files Browse the repository at this point in the history
* fix: Replace missing file with basic React template

* fix: add basic.tsx, which was missing

---------

Co-authored-by: Maarten A. Breddels <[email protected]>
  • Loading branch information
manzt and maartenbreddels authored Dec 19, 2023
1 parent 06305c6 commit a081714
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions ipyreact/basic.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import Button from '@mui/material/Button';
import confetti from "canvas-confetti";

import * as React from "react";
export default function({value, on_value, debug}) {
if(debug) {
console.log("value=", value, on_value);
}
return <Button variant="contained" onClick={() => confetti() && on_value(value + 1)}>{value || 0} times confetti</Button>
};

0 comments on commit a081714

Please sign in to comment.