diff --git a/docs/package.json b/docs/package.json index f6e866a..4124090 100644 --- a/docs/package.json +++ b/docs/package.json @@ -16,6 +16,7 @@ "@types/react": "^18.0.21", "@types/react-dom": "^18.0.6", "astro": "^2.7.0", + "driver.js": "1.1.1-next.0", "react": "^18.0.0", "react-dom": "^18.0.0", "react-fast-marquee": "^1.6.0", diff --git a/docs/pnpm-lock.yaml b/docs/pnpm-lock.yaml index 57a873a..e785e94 100644 --- a/docs/pnpm-lock.yaml +++ b/docs/pnpm-lock.yaml @@ -23,6 +23,9 @@ dependencies: astro: specifier: ^2.7.0 version: 2.7.0 + driver.js: + specifier: 1.1.1-next.0 + version: 1.1.1-next.0 react: specifier: ^18.0.0 version: 18.2.0 @@ -1373,6 +1376,10 @@ packages: /dlv@1.1.3: resolution: {integrity: sha512-+HlytyjlPKnIG8XuRG8WvmBP8xs8P71y+SKKS6ZXWoEgLuePxtDoUEiH7WkdePWrQ5JBpE6aoVqfZfJUQkjXwA==} + /driver.js@1.1.1-next.0: + resolution: {integrity: sha512-hXBZzvcVsU0MlNozeQbp3S49fUuPaKTDVNQe2hKK57nQCmr5WgCE3QVi2IgDMeEI6a+z7UDpbRnCHJt+Lt/NkQ==} + dev: false + /dset@3.1.2: resolution: {integrity: sha512-g/M9sqy3oHe477Ar4voQxWtaPIFw1jTdKZuomOjhCcBx9nHUNn0pu6NopuFFrTh/TRZIKEj+76vLWFu9BNKk+Q==} engines: {node: '>=4'} diff --git a/docs/src/components/examples/SimpleHighlight.tsx b/docs/src/components/examples/SimpleHighlight.tsx new file mode 100644 index 0000000..94429b6 --- /dev/null +++ b/docs/src/components/examples/SimpleHighlight.tsx @@ -0,0 +1,15 @@ +import { useEffect } from "react"; +import type { DriveStep } from "driver.js"; + +type SimpleHighlightProps = { + popover: DriveStep.Popover; +} + +export function SimpleHighlight() { + useEffect(() => { + console.log('in browser'); + }, []); + return ( + + ); +} \ No newline at end of file diff --git a/docs/src/content/guides/basic-usage.mdx b/docs/src/content/guides/basic-usage.mdx index 76f677f..5d97d8a 100644 --- a/docs/src/content/guides/basic-usage.mdx +++ b/docs/src/content/guides/basic-usage.mdx @@ -4,8 +4,11 @@ groupTitle: "Introduction" sort: 2 --- +import { SimpleHighlight } from "../../components/examples/SimpleHighlight.tsx"; + Once installed, you can import and start using the library. Given below is a simple example of how to highlight a single element. +