From a50de72ccf3a62e32837957d3ea3ac89e17b882f Mon Sep 17 00:00:00 2001 From: Julie Wongbandue Date: Tue, 29 Nov 2022 13:23:34 -0500 Subject: [PATCH] Add onClick to Tourpoint type (#211) * Add onClick to Tourpoint type * 0.137.1 --- examples/nextjs/package.json | 2 +- package.json | 2 +- src/components/TourPoint/TourPoint.story.tsx | 1 + src/components/TourPoint/TourPoint.types.ts | 1 + src/utils/HOCs/withIris.ts | 2 +- 5 files changed, 5 insertions(+), 3 deletions(-) diff --git a/examples/nextjs/package.json b/examples/nextjs/package.json index 7b66f2520..2f8f20b5b 100644 --- a/examples/nextjs/package.json +++ b/examples/nextjs/package.json @@ -8,7 +8,7 @@ "start": "next start" }, "dependencies": { - "@vimeo/iris": "^0.137.0", + "@vimeo/iris": "^0.137.1", "next": "12.0.3", "polished": "^4.1.3", "react": "17.0.2", diff --git a/package.json b/package.json index 2e2558b9e..80fe817d0 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "@vimeo/iris", "homepage": "https://github.com/vimeo/iris/tree/main", "bugs": "https://github.com/vimeo/iris/issues", - "version": "0.137.0", + "version": "0.137.1", "private": false, "license": "MIT", "description": "Vimeo Design System", diff --git a/src/components/TourPoint/TourPoint.story.tsx b/src/components/TourPoint/TourPoint.story.tsx index 2e9dff367..353e75d17 100644 --- a/src/components/TourPoint/TourPoint.story.tsx +++ b/src/components/TourPoint/TourPoint.story.tsx @@ -40,6 +40,7 @@ const Template: Story = (args) => { step={1} title="A Fresh New Look" content="All the leaves are brown and the sky is grey, I've been for a walk on a winters day." + onClick={() => console.log('tourpoint clicked')} > 1 diff --git a/src/components/TourPoint/TourPoint.types.ts b/src/components/TourPoint/TourPoint.types.ts index 5b751843f..7f97c7df7 100644 --- a/src/components/TourPoint/TourPoint.types.ts +++ b/src/components/TourPoint/TourPoint.types.ts @@ -22,6 +22,7 @@ export interface Props { confirmation?: ReactNode; content?: ReactNode; dismission?: ReactNode; + onClick?: (event: MouseEvent) => void; onClose?: (event: MouseEvent, step: StepEvent) => void; /** * The address or URL of the a media resource that is to be considered. diff --git a/src/utils/HOCs/withIris.ts b/src/utils/HOCs/withIris.ts index 9be69bd1e..dc9955e37 100644 --- a/src/utils/HOCs/withIris.ts +++ b/src/utils/HOCs/withIris.ts @@ -9,7 +9,7 @@ import { } from 'react'; import { ThemeContext } from 'styled-components'; -const version = '0.137.0'; +const version = '0.137.1'; type IrisMeta = | true