Skip to content

Commit f0601da

Browse files
fix(alert): margin interno (#585)
1 parent 489f7b1 commit f0601da

File tree

3 files changed

+19
-13
lines changed

3 files changed

+19
-13
lines changed

src/documentation/pages/Atoms/Label.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ export const ViewLabel = (): JSX.Element => {
77
<>
88
<MyHeading>Label</MyHeading>
99
<MyText>
10-
Eate componente permite asignar y mostrar rápidamente información relevante sobre elementos
10+
Este componente permite asignar y mostrar rápidamente información relevante sobre elementos
1111
individuales, proporcionando una forma visualmente efectiva de categorizar, destacar o
1212
etiquetar contenido.
1313
</MyText>

src/organisms/Alerts/Alert.test.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
import { render, screen, fireEvent } from '@testing-library/react'
2+
// TODO: utilizar userEvent
3+
24
import { Alert } from './Alert'
35

46
describe('Alert Component', () => {

src/organisms/Alerts/Alert.tsx

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Box, HStack, useMediaQuery } from '@chakra-ui/react'
1+
import { Box, useMediaQuery } from '@chakra-ui/react'
22

33
import { BtnLink, BtnPrimary } from '@/molecules'
44
import { vars } from '@/theme'
@@ -47,7 +47,7 @@ export function Alert({
4747

4848
return (
4949
<Box
50-
className={isFlash ? 'flashNotification' : 'embeddedAlert'}
50+
className={isFlash ? 'flashNotification' : 'e_alert'}
5151
alignItems={!isMobile ? 'center' : 'unset'}
5252
backgroundColor={alertStates[state].bg}
5353
borderRadius="8px"
@@ -62,9 +62,10 @@ export function Alert({
6262
pr={canDismiss ? '1.75rem' : '1rem'}
6363
position="relative"
6464
>
65-
<HStack
65+
<Box
6666
gap="10px"
6767
className="alertContent"
68+
display="flex"
6869
sx={{
6970
'.linkButton': {
7071
fontSize: '16px',
@@ -81,17 +82,20 @@ export function Alert({
8182
>
8283
{alertStates[state].icon}
8384
</Box>
84-
<Box
85-
fontFamily="Roboto"
86-
fontSize="16px"
87-
fontWeight="400"
88-
lineHeight="28px"
89-
color={vars('colors-neutral-darkCharcoal')}
90-
>
91-
{children}
85+
<Box display="flex" alignItems="center">
86+
<Box
87+
as="p"
88+
fontFamily="Roboto"
89+
fontSize="16px"
90+
fontWeight="400"
91+
lineHeight="28px"
92+
color={vars('colors-neutral-darkCharcoal')}
93+
>
94+
{children}
95+
</Box>
9296
{buttonType === 'link' && <BtnLink onClick={handleClick}>{buttonText}</BtnLink>}
9397
</Box>
94-
</HStack>
98+
</Box>
9599

96100
{buttonType === 'normal' && (
97101
<BtnPrimary isFullWidth={!!isMobile} leftIcon={buttonIcon} onClick={handleClick}>

0 commit comments

Comments
 (0)