Update chat presentation (#10444)
This commit is contained in:
@@ -86,8 +86,8 @@ export type ButtonState = {
|
||||
export type ButtonContext = VariantProps & ButtonState
|
||||
|
||||
type NonTextElements =
|
||||
| React.ReactElement<any>
|
||||
| Iterable<React.ReactElement<any> | null | undefined | boolean>
|
||||
| React.ReactElement
|
||||
| Iterable<React.ReactElement | null | undefined | boolean>
|
||||
|
||||
export type ButtonProps = Pick<
|
||||
PressableProps,
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
import {createContext, useCallback, useContext, useId, useMemo} from 'react'
|
||||
import {type GestureResponderEvent, View} from 'react-native'
|
||||
import {msg} from '@lingui/core/macro'
|
||||
import {useLingui} from '@lingui/react'
|
||||
import {useLingui} from '@lingui/react/macro'
|
||||
|
||||
import {atoms as a, type TextStyleProp, useTheme, web} from '#/alf'
|
||||
import {
|
||||
@@ -139,7 +138,7 @@ export function Cancel({
|
||||
*/
|
||||
cta?: string
|
||||
}) {
|
||||
const {_} = useLingui()
|
||||
const {t: l} = useLingui()
|
||||
const {close} = Dialog.useDialogContext()
|
||||
const onPress = useCallback(() => {
|
||||
close()
|
||||
@@ -150,9 +149,9 @@ export function Cancel({
|
||||
variant="solid"
|
||||
color="secondary"
|
||||
size="large"
|
||||
label={cta || _(msg`Cancel`)}
|
||||
label={cta || l`Cancel`}
|
||||
onPress={onPress}>
|
||||
<ButtonText>{cta || _(msg`Cancel`)}</ButtonText>
|
||||
<ButtonText>{cta || l`Cancel`}</ButtonText>
|
||||
</Button>
|
||||
)
|
||||
}
|
||||
@@ -191,7 +190,7 @@ export function Action({
|
||||
shouldCloseOnPress?: boolean
|
||||
testID?: string
|
||||
}) {
|
||||
const {_} = useLingui()
|
||||
const {t: l} = useLingui()
|
||||
const {close} = Dialog.useDialogContext()
|
||||
const handleOnPress = useCallback(
|
||||
(e: GestureResponderEvent) => {
|
||||
@@ -209,10 +208,10 @@ export function Action({
|
||||
color={color}
|
||||
disabled={disabled}
|
||||
size="large"
|
||||
label={cta || _(msg`Confirm`)}
|
||||
label={cta || l`Confirm`}
|
||||
onPress={handleOnPress}
|
||||
testID={testID}>
|
||||
<ButtonText>{cta || _(msg`Confirm`)}</ButtonText>
|
||||
<ButtonText>{cta || l`Confirm`}</ButtonText>
|
||||
{icon && <ButtonIcon icon={icon} />}
|
||||
</Button>
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user