about summary refs log tree commit diff
path: root/src/components/ageAssurance/AgeAssuranceBadge.tsx
blob: 030e30529d43538d5381ea6c677afdcad5e8a7ca (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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
import {View} from 'react-native'
import {Trans} from '@lingui/macro'

import {atoms as a, select, useTheme} from '#/alf'
import {ShieldCheck_Stroke2_Corner0_Rounded as Shield} from '#/components/icons/Shield'
import {Text} from '#/components/Typography'

export function AgeAssuranceBadge() {
  const t = useTheme()

  return (
    <View
      style={[
        a.flex_row,
        a.align_center,
        a.gap_xs,
        a.px_sm,
        a.py_xs,
        a.pr_sm,
        a.rounded_full,
        {
          backgroundColor: select(t.name, {
            light: t.palette.primary_100,
            dark: t.palette.primary_100,
            dim: t.palette.primary_100,
          }),
        },
      ]}>
      <Shield size="sm" />
      <Text
        style={[
          a.font_bold,
          a.leading_snug,
          {
            color: select(t.name, {
              light: t.palette.primary_800,
              dark: t.palette.primary_800,
              dim: t.palette.primary_800,
            }),
          },
        ]}>
        <Trans>Age Assurance</Trans>
      </Text>
    </View>
  )
}