about summary refs log tree commit diff
path: root/src/view/com/composer/ExternalEmbedRemoveBtn.tsx
blob: 7df4b7ae44a94447271684c6924b9e4f545e41f9 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
import React from 'react'
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, a.pt_sm, a.pr_sm, a.z_50, {top: 0, right: 0}]}>
      <Button
        label={_(msg`Remove attachment`)}
        onPress={onRemove}
        size="small"
        variant="solid"
        color="secondary"
        shape="round">
        <ButtonIcon icon={X} size="sm" />
      </Button>
    </View>
  )
}