From 9df5caf3c545a7a1c559c6561625d99154aa0603 Mon Sep 17 00:00:00 2001 From: Eric Bailey Date: Tue, 21 Jan 2025 15:56:01 -0600 Subject: Update hashtag menu to use `Menu`, convert to native link for additional a11y and click handling (#7529) * Make tag a normal link on web * Replace old TagMenu with new RichTextTag component, expand and improve click utils * Clarify intents * Ensure we're passing down hint * ope * DRY --- src/components/Menu/types.ts | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/components/Menu/types.ts') diff --git a/src/components/Menu/types.ts b/src/components/Menu/types.ts index 44171d42c..51baa24df 100644 --- a/src/components/Menu/types.ts +++ b/src/components/Menu/types.ts @@ -19,6 +19,7 @@ export type ItemContextType = { } export type RadixPassThroughTriggerProps = { + ref: React.RefObject id: string type: 'button' disabled: boolean @@ -37,6 +38,7 @@ export type RadixPassThroughTriggerProps = { export type TriggerProps = { children(props: TriggerChildProps): React.ReactNode label: string + hint?: string role?: AccessibilityRole } export type TriggerChildProps = @@ -59,11 +61,13 @@ export type TriggerChildProps = * object is empty. */ props: { + ref: null onPress: () => void onFocus: () => void onBlur: () => void onPressIn: () => void onPressOut: () => void + accessibilityHint?: string accessibilityLabel: string accessibilityRole: AccessibilityRole } @@ -85,6 +89,7 @@ export type TriggerChildProps = onBlur: () => void onMouseEnter: () => void onMouseLeave: () => void + accessibilityHint?: string accessibilityLabel: string accessibilityRole: AccessibilityRole } -- cgit 1.4.1