diff --git a/packages/examples/packages/jsx/snap.manifest.json b/packages/examples/packages/jsx/snap.manifest.json index 10a2d1b149..6ce7ca8f05 100644 --- a/packages/examples/packages/jsx/snap.manifest.json +++ b/packages/examples/packages/jsx/snap.manifest.json @@ -7,7 +7,7 @@ "url": "https://github.com/MetaMask/snaps.git" }, "source": { - "shasum": "hMfqZ8Nrz8lpBhxOdId3kaND5WZrwxQd5Sx+KxjY0K8=", + "shasum": "VFtSPt9oGHKJZJT0+xPNssG/2ihl+rXg5gQGFTnHfrk=", "location": { "npm": { "filePath": "dist/bundle.js", diff --git a/packages/examples/packages/jsx/src/components/Counter.tsx b/packages/examples/packages/jsx/src/components/Counter.tsx index fbfa9e7633..c1e68899cd 100644 --- a/packages/examples/packages/jsx/src/components/Counter.tsx +++ b/packages/examples/packages/jsx/src/components/Counter.tsx @@ -1,5 +1,5 @@ import type { SnapComponent } from '@metamask/snaps-sdk/jsx'; -import { Bold, Button, Box, Text } from '@metamask/snaps-sdk/jsx'; +import { Bold, Button, Box, Text, Tooltip } from '@metamask/snaps-sdk/jsx'; /** * The props for the {@link Counter} component. @@ -10,6 +10,18 @@ export type CounterProps = { count: number; }; +/** + * A tooltip content component, which explains how to use the counter. + * This component is used as the content of a {@link Tooltip} component. + * + * @returns The tooltip content component. + */ +export const TooltipContent = () => ( + + Click the increment button to increase the count. + +); + /** * A counter component, which shows the current count, and a button to increment * it by one. @@ -21,9 +33,11 @@ export type CounterProps = { export const Counter: SnapComponent = ({ count }) => { return ( - - Count: {String(count)} - + }> + + Count: {String(count)} + + );