Use on-device translation on mobile when available (#9930)
Co-authored-by: Samuel Newman <mozzius@protonmail.com>
This commit is contained in:
@@ -70,7 +70,7 @@ export function Root({children, value, onValueChange, disabled}: RootProps) {
|
||||
)
|
||||
}
|
||||
|
||||
export function Trigger({children, label}: TriggerProps) {
|
||||
export function Trigger({children, hitSlop, label}: TriggerProps) {
|
||||
const {control} = useSelectContext()
|
||||
const {state: focused, onIn: onFocus, onOut: onBlur} = useInteractionState()
|
||||
const {
|
||||
@@ -100,6 +100,7 @@ export function Trigger({children, label}: TriggerProps) {
|
||||
} else {
|
||||
return (
|
||||
<Button
|
||||
hitSlop={hitSlop}
|
||||
label={label}
|
||||
onPress={control.open}
|
||||
style={[a.flex_1, a.justify_between, a.pl_lg, a.pr_md]}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import {
|
||||
type AccessibilityProps,
|
||||
type Insets,
|
||||
type StyleProp,
|
||||
type TextStyle,
|
||||
type ViewStyle,
|
||||
@@ -60,6 +61,7 @@ export type RadixPassThroughTriggerProps = {
|
||||
|
||||
export type TriggerProps = {
|
||||
children: React.ReactNode | ((props: TriggerChildProps) => React.ReactNode)
|
||||
hitSlop?: number | Insets | null
|
||||
label: string
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user