Skip to content

Commit ea13bf1

Browse files
fix(PDYE-408-alerts): corrección de estilo componente alerta (#607)
1 parent 4928452 commit ea13bf1

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

src/organisms/Alerts/Alert.tsx

+5-3
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ export function Alert({
2727
buttonText,
2828
buttonIcon,
2929
buttonLink = false,
30+
fullWidth = false,
3031
isFlash = false,
3132
onClick,
3233
state,
@@ -56,16 +57,16 @@ export function Alert({
5657
gap={!isFlash ? '16px' : ''}
5758
justifyContent={!isMobile ? 'space-between' : ''}
5859
margin={m}
59-
width="100%"
60-
maxWidth="796px"
60+
width={fullWidth ? '100%' : 'fit-content'}
61+
maxWidth={fullWidth ? 'none' : '796px'}
6162
p="1rem"
6263
pr={canDismiss ? '1.75rem' : '1rem'}
6364
position="relative"
6465
>
6566
<Box
67+
display="flex"
6668
gap="10px"
6769
className="alertContent"
68-
display="flex"
6970
sx={{
7071
'.linkButton': {
7172
fontSize: '16px',
@@ -85,6 +86,7 @@ export function Alert({
8586
<Box display="flex" alignItems="center">
8687
<Box
8788
as="p"
89+
alignSelf="center"
8890
fontFamily="Roboto"
8991
fontSize="16px"
9092
fontWeight="400"

src/organisms/Alerts/types.d.ts

+4
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@ export interface IAlertProps {
2020
* Boolean que determina si el botón es tipo link
2121
*/
2222
buttonLink?: boolean
23+
/**
24+
* Ancho al 100% del contenedot
25+
*/
26+
fullWidth?: boolean
2327
/**
2428
* Para notificación flash
2529
*/

0 commit comments

Comments
 (0)