|
1 | | -import { Box, Group, Text, ThemeIcon } from "@mantine/core"; |
2 | | -import { IconCircleCheck } from "@tabler/icons-react"; |
3 | | -import { resolveBackground } from "../configs/backgrounds.js"; |
| 1 | +import { Box, Group, Text, ThemeIcon } from '@mantine/core' |
| 2 | +import { IconCircleCheck } from '@tabler/icons-react' |
| 3 | +import { resolveBackground } from '../configs/backgrounds.js' |
4 | 4 |
|
5 | 5 | /** |
6 | 6 | * TrustBadge - A trust/certification seal badge. |
7 | 7 | * (Previously: SeloExclusivo) |
8 | 8 | */ |
9 | | -export function TrustBadge({ |
10 | | - text = "Selo Exclusivo RiLiGar", |
11 | | - color = "green.6", |
12 | | - background = "gray", |
13 | | -}) { |
14 | | - const bg = resolveBackground(background); |
15 | | - return ( |
16 | | - <Box |
17 | | - p="xs" |
18 | | - bg={bg} |
19 | | - style={{ |
20 | | - borderRadius: "8px", |
21 | | - border: "1px solid var(--mantine-color-gray-2)", |
22 | | - display: "inline-block", |
23 | | - }} |
24 | | - > |
25 | | - <Group gap="xs"> |
26 | | - <ThemeIcon color={color} variant="light" size="sm" radius="xl"> |
27 | | - <IconCircleCheck size={14} aria-hidden="true" /> |
28 | | - </ThemeIcon> |
29 | | - <Text size="xs" fw={700} c="gray.7" tt="uppercase" lts={0.5}> |
30 | | - {text} |
31 | | - </Text> |
32 | | - </Group> |
33 | | - </Box> |
34 | | - ); |
| 9 | +export function TrustBadge({ text = 'Selo Exclusivo RiLiGar', color = 'green.6', background = 'gray' }) { |
| 10 | + const bg = resolveBackground(background) |
| 11 | + return ( |
| 12 | + <Box |
| 13 | + p="xs" |
| 14 | + bg={bg} |
| 15 | + style={{ |
| 16 | + border: '1px solid var(--mantine-color-gray-2)', |
| 17 | + display: 'inline-block', |
| 18 | + }} |
| 19 | + > |
| 20 | + <Group gap="xs"> |
| 21 | + <ThemeIcon |
| 22 | + color={color} |
| 23 | + variant="light" |
| 24 | + size="sm" |
| 25 | + > |
| 26 | + <IconCircleCheck |
| 27 | + size={14} |
| 28 | + aria-hidden="true" |
| 29 | + /> |
| 30 | + </ThemeIcon> |
| 31 | + <Text |
| 32 | + size="xs" |
| 33 | + fw={700} |
| 34 | + c="gray.7" |
| 35 | + tt="uppercase" |
| 36 | + lts={0.5} |
| 37 | + > |
| 38 | + {text} |
| 39 | + </Text> |
| 40 | + </Group> |
| 41 | + </Box> |
| 42 | + ) |
35 | 43 | } |
36 | 44 |
|
37 | 45 | /** @deprecated Use TrustBadge instead */ |
38 | | -export const SeloExclusivo = TrustBadge; |
| 46 | +export const SeloExclusivo = TrustBadge |
0 commit comments