hide alternative ratio buttons when using custom ratio
parent
bc956803b8
commit
beddddcb57
|
@ -117,36 +117,40 @@ export function Component({
|
||||||
maximumValue={3}
|
maximumValue={3}
|
||||||
containerStyle={styles.slider}
|
containerStyle={styles.slider}
|
||||||
/>
|
/>
|
||||||
<TouchableOpacity
|
{as === AspectRatio.Custom ? null : (
|
||||||
onPress={doSetAs(AspectRatio.Wide)}
|
<>
|
||||||
accessibilityRole="button"
|
<TouchableOpacity
|
||||||
accessibilityLabel={_(msg`Wide`)}
|
onPress={doSetAs(AspectRatio.Wide)}
|
||||||
accessibilityHint={_(msg`Sets image aspect ratio to wide`)}>
|
accessibilityRole="button"
|
||||||
<RectWideIcon
|
accessibilityLabel={_(msg`Wide`)}
|
||||||
size={24}
|
accessibilityHint={_(msg`Sets image aspect ratio to wide`)}>
|
||||||
style={as === AspectRatio.Wide ? s.blue3 : pal.text}
|
<RectWideIcon
|
||||||
/>
|
size={24}
|
||||||
</TouchableOpacity>
|
style={as === AspectRatio.Wide ? s.blue3 : pal.text}
|
||||||
<TouchableOpacity
|
/>
|
||||||
onPress={doSetAs(AspectRatio.Tall)}
|
</TouchableOpacity>
|
||||||
accessibilityRole="button"
|
<TouchableOpacity
|
||||||
accessibilityLabel={_(msg`Tall`)}
|
onPress={doSetAs(AspectRatio.Tall)}
|
||||||
accessibilityHint={_(msg`Sets image aspect ratio to tall`)}>
|
accessibilityRole="button"
|
||||||
<RectTallIcon
|
accessibilityLabel={_(msg`Tall`)}
|
||||||
size={24}
|
accessibilityHint={_(msg`Sets image aspect ratio to tall`)}>
|
||||||
style={as === AspectRatio.Tall ? s.blue3 : pal.text}
|
<RectTallIcon
|
||||||
/>
|
size={24}
|
||||||
</TouchableOpacity>
|
style={as === AspectRatio.Tall ? s.blue3 : pal.text}
|
||||||
<TouchableOpacity
|
/>
|
||||||
onPress={doSetAs(AspectRatio.Square)}
|
</TouchableOpacity>
|
||||||
accessibilityRole="button"
|
<TouchableOpacity
|
||||||
accessibilityLabel={_(msg`Square`)}
|
onPress={doSetAs(AspectRatio.Square)}
|
||||||
accessibilityHint={_(msg`Sets image aspect ratio to square`)}>
|
accessibilityRole="button"
|
||||||
<SquareIcon
|
accessibilityLabel={_(msg`Square`)}
|
||||||
size={24}
|
accessibilityHint={_(msg`Sets image aspect ratio to square`)}>
|
||||||
style={as === AspectRatio.Square ? s.blue3 : pal.text}
|
<SquareIcon
|
||||||
/>
|
size={24}
|
||||||
</TouchableOpacity>
|
style={as === AspectRatio.Square ? s.blue3 : pal.text}
|
||||||
|
/>
|
||||||
|
</TouchableOpacity>
|
||||||
|
</>
|
||||||
|
)}
|
||||||
</View>
|
</View>
|
||||||
<View style={styles.btns}>
|
<View style={styles.btns}>
|
||||||
<TouchableOpacity
|
<TouchableOpacity
|
||||||
|
|
Loading…
Reference in New Issue