Skip to content

Commit 0a95e3a

Browse files
committed
refactor: standardize component radii by removing explicit TrustBadge border radius and setting default ActionIcon radius to 0.
1 parent cccbf63 commit 0a95e3a

File tree

2 files changed

+43
-30
lines changed

2 files changed

+43
-30
lines changed

src/components/TrustBadge.jsx

Lines changed: 38 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,46 @@
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'
44

55
/**
66
* TrustBadge - A trust/certification seal badge.
77
* (Previously: SeloExclusivo)
88
*/
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+
)
3543
}
3644

3745
/** @deprecated Use TrustBadge instead */
38-
export const SeloExclusivo = TrustBadge;
46+
export const SeloExclusivo = TrustBadge

src/theme.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,11 @@ export const theme = createTheme({
120120
size: 'lg',
121121
},
122122
},
123+
ActionIcon: {
124+
defaultProps: {
125+
radius: '0',
126+
},
127+
},
123128
Divider: {
124129
defaultProps: {
125130
color: 'gray.2',

0 commit comments

Comments
 (0)