MCPcopy Create free account
hub / github.com/dailydotdev/apps / Screen

Function Screen

packages/shared/src/hooks/utils/useKeyboardFit.spec.tsx:5–15  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

3import { useKeyboardFit } from './useKeyboardFit';
4
5const Screen = (): React.ReactElement => {
6 const ref = useRef<HTMLDivElement>(null);
7 const height = useKeyboardFit(ref, true);
8
9 return (
10 <div ref={ref}>
11 <textarea aria-label="composer" />
12 <span>{height === undefined ? 'unfitted' : `fitted ${height}`}</span>
13 </div>
14 );
15};
16
17type ViewportStub = EventTarget & {
18 width: number;

Callers

nothing calls this directly

Calls 1

useKeyboardFitFunction · 0.90

Tested by

no test coverage detected