TriggerRenderProps — @gj-kit/expo-ui
@gj-kit/expo-ui에서 공개하는 interface입니다. package version 0.8.1의 release declaration을 그대로 표시합니다.
검증된 import 예제
섹션 제목: “검증된 import 예제”import { TriggerRenderProps } from '@gj-kit/expo-ui';시그니처, 매개변수, 반환 타입
섹션 제목: “시그니처, 매개변수, 반환 타입”/** * The injected contract of the renderTrigger slot. * * The kit owns trigger behavior and accessibility; the consumer owns only the * visuals. Both a type-level union and runtime validation enforce that split. *//** * Props the kit injects into a `renderTrigger` element. Spread every one of * them onto a single Pressable — or an equivalent host that actually forwards * React Native press handling (a plain View silently drops `onPress` and * ships an announced-but-inoperable button, so it is not a valid host). The * kit owns press behavior, disabled/expanded accessibility state, ids, and * the measurement hooks that anchoring needs, while the consumer owns only * the visuals. The object also carries platform wiring beyond these declared * keys (web `aria-haspopup`/`aria-controls`/key handlers, Select value text), * so forwarding a hand-picked subset instead of spreading breaks the * contract. */interface TriggerRenderProps { /** * Must reach the returned host element. Anchored positioning measures the * trigger through it and dismissal restores focus to it; the component * throws when it opens without the ref attached. */ readonly ref: (node: unknown) => void; readonly onPress: (event: GestureResponderEvent) => void; readonly disabled: boolean; /** 'button' for Menu (and native Select); 'combobox' for the web Select. */ readonly accessibilityRole: 'button' | 'combobox'; readonly accessibilityLabel: string; readonly accessibilityState: { readonly disabled: boolean; readonly expanded: boolean; readonly busy: boolean; }; /** * Dual-written with accessibilityState.expanded: React Native maps aria-* * onto accessibilityState natively, while React Native Web needs the aria * attribute directly because it does not map accessibilityState to DOM aria. */ readonly 'aria-expanded': boolean; /** Select only — the helper or error text of the field. */ readonly accessibilityHint?: string | undefined; /** Select only — the displayed value or placeholder. */ readonly accessibilityValue?: { readonly text: string; } | undefined; /** The component's triggerTestID (web Select falls back to `${testID}-trigger`). */ readonly testID?: string | undefined; /** Re-measures an open native anchored panel when the trigger's layout moves. */ readonly onLayout?: (() => void) | undefined; /** Web Select only — the DOM id the label and popup relationships expect. */ readonly nativeID?: string | undefined;}이 선언은 매개변수, optionality, 제네릭, 반환값, 공개 union/type 계약의 정본입니다. 호출 전 필요한 환경·권한·오류 경계는 패키지 Golden path와 이 subpath의 import 조건을 함께 확인하세요.
Release context
섹션 제목: “Release context”- 패키지:
@gj-kit/expo-ui - 버전:
0.8.1 - 공개 entry:
. - 소스: GitHub
구현 주석
섹션 제목: “구현 주석”Props the kit injects into a renderTrigger element. Spread every one of
them onto a single Pressable — or an equivalent host that actually forwards
React Native press handling (a plain View silently drops onPress and
ships an announced-but-inoperable button, so it is not a valid host). The
kit owns press behavior, disabled/expanded accessibility state, ids, and
the measurement hooks that anchoring needs, while the consumer owns only
the visuals. The object also carries platform wiring beyond these declared
keys (web aria-haspopup/aria-controls/key handlers, Select value text),
so forwarding a hand-picked subset instead of spreading breaks the
contract.