change color on press
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
import React, {useCallback, useState} from 'react'
|
import {useCallback, useState} from 'react'
|
||||||
import {Keyboard, Pressable, View} from 'react-native'
|
import {Keyboard, Pressable, View} from 'react-native'
|
||||||
import {msg} from '@lingui/macro'
|
import {msg} from '@lingui/macro'
|
||||||
import {useLingui} from '@lingui/react'
|
import {useLingui} from '@lingui/react'
|
||||||
@@ -34,7 +34,7 @@ export function ComposerPrompt() {
|
|||||||
const {requestVideoAccessIfNeeded} = useVideoLibraryPermission()
|
const {requestVideoAccessIfNeeded} = useVideoLibraryPermission()
|
||||||
const sheetWrapper = useSheetWrapper()
|
const sheetWrapper = useSheetWrapper()
|
||||||
|
|
||||||
const onPress = React.useCallback(() => {
|
const onPress = useCallback(() => {
|
||||||
logger.metric('composerPrompt:press', {})
|
logger.metric('composerPrompt:press', {})
|
||||||
openComposer({})
|
openComposer({})
|
||||||
}, [openComposer])
|
}, [openComposer])
|
||||||
@@ -203,13 +203,14 @@ export function ComposerPrompt() {
|
|||||||
accessibilityHint={_(msg`Opens device camera`)}
|
accessibilityHint={_(msg`Opens device camera`)}
|
||||||
variant="ghost"
|
variant="ghost"
|
||||||
shape="round">
|
shape="round">
|
||||||
{({hovered}) => (
|
{({hovered, pressed, focused}) => (
|
||||||
<CameraIcon
|
<CameraIcon
|
||||||
size="md"
|
size="md"
|
||||||
style={{
|
style={{
|
||||||
color: hovered
|
color:
|
||||||
? t.palette.primary_500
|
hovered || pressed || focused
|
||||||
: t.palette.contrast_300,
|
? t.palette.primary_500
|
||||||
|
: t.palette.contrast_300,
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
@@ -224,13 +225,14 @@ export function ComposerPrompt() {
|
|||||||
accessibilityHint={_(msg`Opens image picker`)}
|
accessibilityHint={_(msg`Opens image picker`)}
|
||||||
variant="ghost"
|
variant="ghost"
|
||||||
shape="round">
|
shape="round">
|
||||||
{({hovered}) => (
|
{({hovered, pressed, focused}) => (
|
||||||
<ImageIcon
|
<ImageIcon
|
||||||
size="md"
|
size="md"
|
||||||
style={{
|
style={{
|
||||||
color: hovered
|
color:
|
||||||
? t.palette.primary_500
|
hovered || pressed || focused
|
||||||
: t.palette.contrast_300,
|
? t.palette.primary_500
|
||||||
|
: t.palette.contrast_300,
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
|
|||||||
Reference in New Issue
Block a user