ff5ad38253
* update eslint config with jsx runtime * leverage jsx transform to remove unnecessary react imports and update eslint config * run yarn lint --fix to remove eslint disables related to react/prop-types that is now disabled
26 lines
707 B
TypeScript
26 lines
707 B
TypeScript
import {View} from 'react-native'
|
|
import {msg} from '@lingui/macro'
|
|
import {useLingui} from '@lingui/react'
|
|
|
|
import {atoms as a} from '#/alf'
|
|
import {Button, ButtonIcon} from '#/components/Button'
|
|
import {TimesLarge_Stroke2_Corner0_Rounded as X} from '#/components/icons/Times'
|
|
|
|
export function ExternalEmbedRemoveBtn({onRemove}: {onRemove: () => void}) {
|
|
const {_} = useLingui()
|
|
|
|
return (
|
|
<View style={[a.absolute, {top: 8, right: 8}, a.z_50]}>
|
|
<Button
|
|
label={_(msg`Remove attachment`)}
|
|
onPress={onRemove}
|
|
size="small"
|
|
variant="solid"
|
|
color="secondary"
|
|
shape="round">
|
|
<ButtonIcon icon={X} size="sm" />
|
|
</Button>
|
|
</View>
|
|
)
|
|
}
|