Skip to content

Commit c6bc68f

Browse files
Merge pull request #6110 from qburst/fix/doc-sites/popperTargetRefImport
Fix the broken doc-site example - Custom input with popper positioning
2 parents 7f0b64b + 354fe15 commit c6bc68f

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

docs-site/src/components/Example/index.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import React, { forwardRef, useMemo, useState } from "react";
1+
import React, { forwardRef, useMemo, useRef, useState } from "react";
22
import { LiveProvider, LiveEditor, LiveError, LivePreview } from "react-live";
33
import DatePicker, {
44
registerLocale,
@@ -164,6 +164,7 @@ export default class CodeExampleComponent extends React.Component<
164164
// NB any globals added here should also be referenced in ../../examples/.eslintrc
165165
useState,
166166
useMemo,
167+
useRef,
167168
DatePicker,
168169
CalendarContainer,
169170
DateFNS,

docs-site/src/examples/live-provider-globals.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import type { MiddlewareState as MiddlewareStateType } from "@floating-ui/react"
55
declare global {
66
const useMemo: typeof React.useMemo;
77
const useState: typeof React.useState;
8+
const useRef: typeof React.useRef;
89
const DatePicker: any;
910
const CalendarContainer: any;
1011
const range: any;

0 commit comments

Comments
 (0)